summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-09-20 19:05:32 +0000
committerjhb <jhb@FreeBSD.org>2004-09-20 19:05:32 +0000
commite487fab4953bbf1f92413af17326300aa1bb2e0f (patch)
treeb2136a0a4b646b54ea0fa359879a4c4a13989501 /sys/alpha
parent777f9072761c10509e408574842552f1b8779331 (diff)
downloadFreeBSD-src-e487fab4953bbf1f92413af17326300aa1bb2e0f.zip
FreeBSD-src-e487fab4953bbf1f92413af17326300aa1bb2e0f.tar.gz
- Add support for "paging" in stack trace output. That is, when you do
a stack trace from ddb, the output will pause with a '--More--' prompt every 18 lines. If you hit Enter, it will print another line and prompt again. If you hit space it will output another page and then prompt. If you hit 'q' or 'x' it will abort the rest of the stack trace. - Fix the sparc64 userland stack trace to honor the total count of lines to print. This is useful if your trace happens to walk back onto 0xdeadc0de and gets stuck in an endless loop. MFC after: 1 month Tested on: i386, alpha, sparc64
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/db_trace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/alpha/alpha/db_trace.c b/sys/alpha/alpha/db_trace.c
index 615bd2e..8671ca8 100644
--- a/sys/alpha/alpha/db_trace.c
+++ b/sys/alpha/alpha/db_trace.c
@@ -213,14 +213,16 @@ db_backtrace(struct thread *td, db_addr_t frame, db_addr_t pc, int count)
db_expr_t diff;
db_addr_t symval;
u_long last_ipl, tfps;
- int i;
+ int i, quit;
if (count == -1)
count = 1024;
last_ipl = ~0L;
tf = NULL;
- while (count--) {
+ quit = 0;
+ db_setup_paging(db_simple_pager, &quit, DB_LINES_PER_PAGE);
+ while (count-- && !quit) {
sym = db_search_symbol(pc, DB_STGY_ANY, &diff);
if (sym == DB_SYM_NULL)
return (ENOENT);
OpenPOWER on IntegriCloud