Improve debug output for running in different modes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25691 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-12-06 19:51:11 +00:00
parent c1ea7d2628
commit de11c87c1b
2 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2007-12-06 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSRunLoop.m: Report the current mode when producing detailed
debug output, for better tracking of problems.
2007-12-06 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSException.m: fix error reporting module containing code

View file

@ -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.
*/