diff --git a/ChangeLog b/ChangeLog index 4adc38cb5..ff8043bc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-06 Richard Frith-Macdonald + + * Source/NSRunLoop.m: Report the current mode when producing detailed + debug output, for better tracking of problems. + 2007-12-06 Richard Frith-Macdonald * Source/NSException.m: fix error reporting module containing code diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index 220772a8f..69908726e 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -868,8 +868,8 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1) } } - NSDebugMLLog(@"NSRunLoop", @"limit date %f", - [when timeIntervalSinceReferenceDate]); + NSDebugMLLog(@"NSRunLoop", @"limit date %f in %@", + [when timeIntervalSinceReferenceDate], mode); } return when; } @@ -950,8 +950,6 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1) else { /* Wait until the LIMIT_DATE. */ - NSDebugMLLog(@"NSRunLoop", @"accept I/P before %f (sec from now %f)", - [limit_date timeIntervalSinceReferenceDate], ti); if (ti >= INT_MAX / 1000) { timeout_ms = INT_MAX; // Far future. @@ -962,6 +960,10 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1) } } + NSDebugMLLog(@"NSRunLoop", + @"accept I/P before %f (sec from now %f) in %@", + [limit_date timeIntervalSinceReferenceDate], ti, mode); + if ([_contextStack indexOfObjectIdenticalTo: context] == NSNotFound) { [_contextStack addObject: context]; @@ -982,6 +984,7 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1) */ [context endPoll]; [_contextStack removeObjectIdenticalTo: context]; + NSDebugMLLog(@"NSRunLoop", @"accept I/P completed in %@", mode); } NS_HANDLER { @@ -1016,7 +1019,7 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1) d = [self limitDateForMode: mode]; if (d == nil) { - NSDebugMLLog(@"NSRunLoop", @"run mode with nothing to do"); + NSDebugMLLog(@"NSRunLoop", @"run mode with nothing to don %@", mode); /* * Notify if any tasks have completed. */