aboutsummaryrefslogtreecommitdiff
path: root/tools/debugserver/source/debugserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/debugserver/source/debugserver.cpp')
-rw-r--r--tools/debugserver/source/debugserver.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/debugserver/source/debugserver.cpp b/tools/debugserver/source/debugserver.cpp
index 78990a671d82..a22f046771d9 100644
--- a/tools/debugserver/source/debugserver.cpp
+++ b/tools/debugserver/source/debugserver.cpp
@@ -824,8 +824,9 @@ FileLogCallback(void *baton, uint32_t flags, const char *format, va_list args)
if (baton == NULL || format == NULL)
return;
- ::vfprintf ((FILE *)baton, format, args);
- ::fprintf ((FILE *)baton, "\n");
+ ::vfprintf((FILE *)baton, format, args);
+ ::fprintf((FILE *)baton, "\n");
+ ::fflush((FILE *)baton);
}
@@ -885,6 +886,10 @@ static struct option g_long_options[] =
int
main (int argc, char *argv[])
{
+ // If debugserver is launched with DYLD_INSERT_LIBRARIES, unset it so we
+ // don't spawn child processes with this enabled.
+ unsetenv("DYLD_INSERT_LIBRARIES");
+
const char *argv_sub_zero = argv[0]; // save a copy of argv[0] for error reporting post-launch
#if defined (__APPLE__)
@@ -1076,7 +1081,7 @@ main (int argc, char *argv[])
case 'K':
g_detach_on_error = false;
-
+ break;
case 'W':
if (optarg && optarg[0])
working_dir.assign(optarg);