mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user