aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/i386/db_trace.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-07-12 21:22:44 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-07-12 21:22:44 +0000
commit19e9205a23a412d9e48707fc012db23116ccf282 (patch)
treef2aff187736391b024e6cf6f28e95e5708a2d927 /sys/i386/i386/db_trace.c
parent243d8ac855e2702cccf8b7ebd7e3e4d1f570dda4 (diff)
downloadsrc-19e9205a23a412d9e48707fc012db23116ccf282.tar.gz
src-19e9205a23a412d9e48707fc012db23116ccf282.zip
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.
Notes
Notes: svn path=/head/; revision=160312
Diffstat (limited to 'sys/i386/i386/db_trace.c')
-rw-r--r--sys/i386/i386/db_trace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c
index ea2c20884222..c3ea8ac5c9d1 100644
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -401,7 +401,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, struct i386_frame *frame,
int *argp;
db_expr_t offset;
c_db_sym_t sym;
- int instr, narg, quit;
+ int instr, narg;
boolean_t first;
/*
@@ -432,9 +432,7 @@ db_backtrace(struct thread *td, struct trapframe *tf, struct i386_frame *frame,
count = 1024;
first = TRUE;
- quit = 0;
- db_setup_paging(db_simple_pager, &quit, db_lines_per_page);
- while (count-- && !quit) {
+ while (count-- && !db_pager_quit) {
sym = db_search_symbol(pc, DB_STGY_ANY, &offset);
db_symbol_values(sym, &name, NULL);