llvm/lldb/test/API/functionalities/dlopen_other_executable/main.c

#include <dlfcn.h>
#include <assert.h>

int main() {
  int i = 0; // break here
  // dlopen the 'other' test executable.
  int h = (int) dlopen("other", RTLD_LAZY);
  assert(h && "dlopen failed?");
  return i; // break after dlopen
}