Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / functionalities / dyld-exec-linux / main.cpp
blobdddab58cb492c3101300f554aa03fe72e2a9ec57
1 #include <unistd.h>
3 int main(int argc, const char *argv[], const char *envp[]) {
4 if (argc == 2) {
5 // If we have two arguments the first is the path to this executable,
6 // the second is the path to the linux dynamic loader that we should
7 // exec with. We want to re-run this problem under the dynamic loader
8 // and make sure we can hit the breakpoint in the "else".
9 const char *interpreter = argv[1];
10 const char *this_program = argv[0];
11 const char *exec_argv[3] = {interpreter, this_program, nullptr};
12 execve(interpreter, (char *const *)exec_argv, (char *const *)envp);
14 // Break here
15 return 0;