diff options
author | jake <jake@FreeBSD.org> | 2003-02-22 23:30:37 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-02-22 23:30:37 +0000 |
commit | 696c85b9bdb8b3219b50eaf8bde5e2f49d95efe6 (patch) | |
tree | af72c72304041a2a82f952aeda9833749d2ba22b /sys/kern | |
parent | 0557718520112695fc45f4a66d5949f5e06de976 (diff) | |
download | FreeBSD-src-696c85b9bdb8b3219b50eaf8bde5e2f49d95efe6.zip FreeBSD-src-696c85b9bdb8b3219b50eaf8bde5e2f49d95efe6.tar.gz |
Add a /a modifier to the show ktr ddb command, which prints the whole trace
buffer without stopping. Useful if you just want to capture the output but
can't run ktrdump.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_ktr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c index 8a88bd8..fc14663 100644 --- a/sys/kern/kern_ktr.c +++ b/sys/kern/kern_ktr.c @@ -263,6 +263,7 @@ static int db_mach_vtrace(void); DB_SHOW_COMMAND(ktr, db_ktr_all) { int c, lines; + int all = 0; lines = NUM_LINES_PER_PAGE; tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); @@ -271,8 +272,13 @@ DB_SHOW_COMMAND(ktr, db_ktr_all) db_ktr_verbose = 1; else db_ktr_verbose = 0; + if (strcmp(modif, "a") == 0) + all = 1; while (db_mach_vtrace()) - if (--lines == 0) { + if (all) { + if (cncheckc() != -1) + return; + } else if (--lines == 0) { db_printf("--More--"); c = cngetc(); db_printf("\r"); |