Pass debug settings to child

This commit is contained in:
Richard Frith-Macdonald 2019-06-07 09:20:15 +01:00
parent 3ab558d078
commit 4336887163
2 changed files with 26 additions and 0 deletions

View file

@ -87,6 +87,8 @@ main(int argc, char *argv[])
{
NSMutableArray *args = AUTORELEASE([pArgs mutableCopy]);
NSString *path = [[NSBundle mainBundle] executablePath];
NSEnumerator *dbg;
NSString *key;
NSAutoreleasePool *inner = nil;
BOOL done = NO;
int status = 0;
@ -95,6 +97,18 @@ main(int argc, char *argv[])
[args removeObjectAtIndex: 0];
/* Pass debug settings to child
* qdddd
* q
*/
dbg = [[[NSProcessInfo processInfo] debugSet] objectEnumerator];
while (nil != (key = [dbg nextObject]))
{
NSString *arg = [@"--GNU-Debug=" stringByAppendingString: key];
[args addObject: arg];
}
if ([pArgs containsObject: @"--Watcher"] == NO)
{
/* In the top level task ... set flags to create a subtask

View file

@ -69,6 +69,8 @@ main(int argc, char *argv[])
{
NSMutableArray *args = AUTORELEASE([pArgs mutableCopy]);
NSString *path = [[NSBundle mainBundle] executablePath];
NSEnumerator *dbg;
NSString *key;
NSAutoreleasePool *inner = nil;
BOOL done = NO;
NSUInteger index = NSNotFound;
@ -77,6 +79,16 @@ main(int argc, char *argv[])
[args removeObjectAtIndex: 0];
/* Pass debug settings to child
*/
dbg = [[[NSProcessInfo processInfo] debugSet] objectEnumerator];
while (nil != (key = [dbg nextObject]))
{
NSString *arg = [@"--GNU-Debug=" stringByAppendingString: key];
[args addObject: arg];
}
if ([pArgs containsObject: @"--Watcher"] == NO)
{
NSUserDefaults *defs;