Minimal dynamic library with one function in it.
#include <stdio.h>
void hello(const char *name) {
printf("hello %s\n", name);
}
$ gcc -dynamiclib /tmp/dynamic.c -o /tmp/dynamic.dylib
$ lldb ...
(lldb) expr int $RTLD_LAZY = 1
(lldb) expr void* $handle = (void*)dlopen("/tmp/dynamic.dylib", $RTLD_LAZY)
(lldb) expr void* $address = (void*)dlsym($handle, "hello")
(lldb) expr ((void(*)(char*))$address)("there")
hello there