summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/ddb/db_command.c5
-rw-r--r--sys/ddb/db_output.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 91c8fcc..8b49c04 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -684,12 +684,17 @@ db_stack_trace_all(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3,
{
struct proc *p;
struct thread *td;
+ int quit;
+ quit = 0;
+ db_setup_paging(db_simple_pager, &quit, db_lines_per_page);
for (p = LIST_FIRST(&allproc); p != NULL; p = LIST_NEXT(p, p_list)) {
FOREACH_THREAD_IN_PROC(p, td) {
db_printf("\nTracing command %s pid %d tid %ld td %p\n",
p->p_comm, p->p_pid, (long)td->td_tid, td);
db_trace_thread(td, -1);
+ if (quit)
+ return;
}
}
}
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c
index 3a0fbc5..fccae29 100644
--- a/sys/ddb/db_output.c
+++ b/sys/ddb/db_output.c
@@ -186,11 +186,14 @@ db_putchar(c, arg)
void
db_setup_paging(db_page_calloutfcn_t *callout, void *arg, int maxlines)
{
-
- db_page_callout = callout;
- db_page_callout_arg = arg;
- db_maxlines = maxlines;
- db_newlines = 0;
+
+ if (db_page_callout == NULL || callout == NULL || arg ==
+ db_page_callout_arg) {
+ db_page_callout = callout;
+ db_page_callout_arg = arg;
+ db_maxlines = maxlines;
+ db_newlines = 0;
+ }
}
/*
OpenPOWER on IntegriCloud