From a72b0bcd7fd4baed9952beefc6398b3d79c789d9 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 12 Jul 2006 21:22:44 +0000 Subject: Simplify the pager support in DDB. Allowing different db commands to install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early. --- sys/powerpc/powerpc/db_trace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sys/powerpc') diff --git a/sys/powerpc/powerpc/db_trace.c b/sys/powerpc/powerpc/db_trace.c index e70f5e1..188e028 100644 --- a/sys/powerpc/powerpc/db_trace.c +++ b/sys/powerpc/powerpc/db_trace.c @@ -131,7 +131,6 @@ db_backtrace(struct thread *td, db_addr_t fp, int count) const char *symname; boolean_t kernel_only = TRUE; boolean_t full = FALSE; - int quit; #if 0 { @@ -151,9 +150,7 @@ db_backtrace(struct thread *td, db_addr_t fp, int count) stackframe = fp; - quit = 0; - db_setup_paging(db_simple_pager, &quit, db_lines_per_page); - while (!quit) { + while (!db_pager_quit) { if (stackframe < PAGE_SIZE) break; -- cgit v1.1