Changed semantics of "traced" invocation without arguments. Instead of

printing the last 30 entries, it continues the last iteration, thus
making the more common use case more comfortable. The old functionality
is still available via "traced 0".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23689 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-01-21 17:59:19 +00:00
parent 9d4fa2c12b
commit 5fa74667c5
1 changed files with 6 additions and 1 deletions

View File

@ -700,6 +700,7 @@ dump_tracing(int argc, char** argv)
static int32 _previousMaxToCheck = 0;
static int32 _previousFirstChecked = 1;
static int32 _previousLastChecked = -1;
static int32 _previousDirection = 1;
static uint32 _previousWritten = 0;
static uint32 _previousEntries = 0;
static TraceEntryIterator iterator;
@ -729,7 +730,8 @@ dump_tracing(int argc, char** argv)
cont = -1;
argi++;
}
}
} else
cont = _previousDirection;
if (cont != 0) {
if (argi < argc) {
@ -915,6 +917,7 @@ dump_tracing(int argc, char** argv)
_previousHasFilter = hasFilter;
_previousFirstChecked = firstToCheck;
_previousLastChecked = lastToCheck;
_previousDirection = direction;
_previousWritten = sWritten;
_previousEntries = sEntries;
@ -1017,6 +1020,8 @@ tracing_init(void)
"off, i.e. printing the previous respectively next entries (as many\n"
"as printed before). In this case the command is continuable, that is\n"
"afterwards entering an empty line in the debugger will reinvoke it.\n"
"If no arguments are given, the command continues in the direction\n"
"of the last invocation.\n"
"\"printteam\" enables printing the items' team ID.\n"
" <start> - The base index of the entries to print. Depending on\n"
" whether the iteration direction is forward or\n"