diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2006-07-12 21:22:44 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2006-07-12 21:22:44 +0000 |
| commit | 19e9205a23a412d9e48707fc012db23116ccf282 (patch) | |
| tree | f2aff187736391b024e6cf6f28e95e5708a2d927 /sys/kern | |
| parent | 243d8ac855e2702cccf8b7ebd7e3e4d1f570dda4 (diff) | |
Notes
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/kern_intr.c | 10 | ||||
| -rw-r--r-- | sys/kern/kern_ktr.c | 17 | ||||
| -rw-r--r-- | sys/kern/subr_prf.c | 7 |
3 files changed, 13 insertions, 21 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 042a0ec1b639..7693954f5175 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -905,16 +905,16 @@ db_dump_intr_event(struct intr_event *ie, int handlers) DB_SHOW_COMMAND(intr, db_show_intr) { struct intr_event *ie; - int quit, all, verbose; + int all, verbose; - quit = 0; verbose = index(modif, 'v') != NULL; all = index(modif, 'a') != NULL; - db_setup_paging(db_simple_pager, &quit, db_lines_per_page); TAILQ_FOREACH(ie, &event_list, ie_list) { if (!all && TAILQ_EMPTY(&ie->ie_handlers)) continue; db_dump_intr_event(ie, verbose); + if (db_pager_quit) + break; } } #endif /* DDB */ @@ -976,11 +976,9 @@ DB_SHOW_COMMAND(intrcnt, db_show_intrcnt) { u_long *i; char *cp; - int quit; cp = intrnames; - db_setup_paging(db_simple_pager, &quit, db_lines_per_page); - for (i = intrcnt, quit = 0; i != eintrcnt && !quit; i++) { + for (i = intrcnt; i != eintrcnt && !db_pager_quit; i++) { if (*cp == '\0') break; if (*i != 0) diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c index 7ae55822bfcf..f12f97153fd9 100644 --- a/sys/kern/kern_ktr.c +++ b/sys/kern/kern_ktr.c @@ -55,8 +55,10 @@ __FBSDID("$FreeBSD$"); #include <machine/ktr.h> #endif - +#ifdef DDB #include <ddb/ddb.h> +#include <ddb/db_output.h> +#endif #ifndef KTR_ENTRIES #define KTR_ENTRIES 1024 @@ -288,22 +290,17 @@ static int db_mach_vtrace(void); DB_SHOW_COMMAND(ktr, db_ktr_all) { - int quit; - quit = 0; tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); tstate.first = -1; - if (strcmp(modif, "v") == 0) - db_ktr_verbose = 1; - else - db_ktr_verbose = 0; - if (strcmp(modif, "a") == 0) { + db_ktr_verbose = index(modif, 'v') != NULL; + if (index(modif, 'a') != NULL) { + db_disable_pager(); while (cncheckc() != -1) if (db_mach_vtrace() == 0) break; } else { - db_setup_paging(db_simple_pager, &quit, db_lines_per_page); - while (!quit) + while (!db_pager_quit) if (db_mach_vtrace() == 0) break; } diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index f003bad2c0aa..12f29b6d82fc 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -912,20 +912,17 @@ SYSCTL_PROC(_kern, OID_AUTO, msgbuf_clear, DB_SHOW_COMMAND(msgbuf, db_show_msgbuf) { - int i, j, quit; - - quit = 0; + int i, j; if (!msgbufmapped) { db_printf("msgbuf not mapped yet\n"); return; } - db_setup_paging(db_simple_pager, &quit, db_lines_per_page); db_printf("msgbufp = %p\n", msgbufp); db_printf("magic = %x, size = %d, r= %u, w = %u, ptr = %p, cksum= %u\n", msgbufp->msg_magic, msgbufp->msg_size, msgbufp->msg_rseq, msgbufp->msg_wseq, msgbufp->msg_ptr, msgbufp->msg_cksum); - for (i = 0; i < msgbufp->msg_size && !quit; i++) { + for (i = 0; i < msgbufp->msg_size && !db_pager_quit; i++) { j = MSGBUF_SEQ_TO_POS(msgbufp, i + msgbufp->msg_rseq); db_printf("%c", msgbufp->msg_ptr[j]); } |
