diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-10-18 04:14:23 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-10-18 04:14:23 +0000 |
| commit | 58d1c9a44f9c3a0b2813e2a63f912d3fe8ec3840 (patch) | |
| tree | 2f60b8fbbfcf5e19a54376803d0d2d21ff5d3363 /lldb/tools/darwin-debug/darwin-debug.cpp | |
| parent | 5cd41c4b13aa8ce63a3e84f8caf668f01167f6f0 (diff) | |
| download | bcm5719-llvm-58d1c9a44f9c3a0b2813e2a63f912d3fe8ec3840.tar.gz bcm5719-llvm-58d1c9a44f9c3a0b2813e2a63f912d3fe8ec3840.zip | |
Still trying to get detach to work with debugserver. Got a bit closer,
but something is still killing our inferior.
Fixed an issue with darwin-debug where it wasn't passing all needed arguments
to the inferior.
Fixed a race condition with the attach to named process code.
llvm-svn: 116697
Diffstat (limited to 'lldb/tools/darwin-debug/darwin-debug.cpp')
| -rw-r--r-- | lldb/tools/darwin-debug/darwin-debug.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lldb/tools/darwin-debug/darwin-debug.cpp b/lldb/tools/darwin-debug/darwin-debug.cpp index f79d837e634..a894806f64c 100644 --- a/lldb/tools/darwin-debug/darwin-debug.cpp +++ b/lldb/tools/darwin-debug/darwin-debug.cpp @@ -87,10 +87,12 @@ exit_with_errno (int err, const char *prefix) } pid_t -posix_spawn_for_debug (const char *path, char *const *argv, char *const *envp, cpu_type_t cpu_type, int disable_aslr) +posix_spawn_for_debug (char *const *argv, char *const *envp, cpu_type_t cpu_type, int disable_aslr) { pid_t pid = 0; + const char *path = argv[0]; + posix_spawnattr_t attr; exit_with_errno (::posix_spawnattr_init (&attr), "::posix_spawnattr_init (&attr) error: "); @@ -203,13 +205,7 @@ int main (int argc, char *const *argv, char *const *envp, const char **apple) printf ("argv[%u] = '%s'\n", i, argv[i]); #endif - const char *exe_path = argv[0]; - - // Skip this inferior program name... - ++argv; - - posix_spawn_for_debug (exe_path, - argv, + posix_spawn_for_debug (argv, pass_env ? envp : NULL, cpu_type, disable_aslr); |

