diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-10-19 18:15:50 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-10-19 18:15:50 +0000 |
| commit | 6162f9774a0dd84f1c72f43d4ad11880f36cae7d (patch) | |
| tree | 3ea5f4d69060b384095fda7ea1fceece03cf1af1 /lldb/tools/darwin-debug/darwin-debug.cpp | |
| parent | 896ac62346e794efd6a6a8131661b48275a654ef (diff) | |
| download | bcm5719-llvm-6162f9774a0dd84f1c72f43d4ad11880f36cae7d.tar.gz bcm5719-llvm-6162f9774a0dd84f1c72f43d4ad11880f36cae7d.zip | |
Fixed all known race conditions with starting a process in a new terminal.
We now spawn a thread to accept a unix socket connection from the inferior
when it spawns in the terminal, then we launch the process, then we get
the pid back through the unix socket, and then wait for it to SIGSTOP.
darwin-debug now clears the terminal screen and prints out the program and
arguments that are about to be launched.
llvm-svn: 116841
Diffstat (limited to 'lldb/tools/darwin-debug/darwin-debug.cpp')
| -rw-r--r-- | lldb/tools/darwin-debug/darwin-debug.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/tools/darwin-debug/darwin-debug.cpp b/lldb/tools/darwin-debug/darwin-debug.cpp index a38bfc249d4..de9b270a18f 100644 --- a/lldb/tools/darwin-debug/darwin-debug.cpp +++ b/lldb/tools/darwin-debug/darwin-debug.cpp @@ -253,6 +253,11 @@ int main (int argc, char *const *argv, char *const *envp, const char **apple) // We are done with the socket close (s); + system("clear"); + printf ("Launching '%s' for debug with %u arguments:\n", argv[0], argc); + for (int i=0; i<argc; ++i) + printf ("argv[%u] = '%s'\n", i, argv[i]); + // Now we posix spawn to exec this process into the inferior that we want // to debug. posix_spawn_for_debug (argv, |

