aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_output.c
diff options
context:
space:
mode:
authorOlivier Houchard <cognet@FreeBSD.org>2005-10-02 22:57:31 +0000
committerOlivier Houchard <cognet@FreeBSD.org>2005-10-02 22:57:31 +0000
commitda927f93bddf1ad22a83b3ca1b12cede71755465 (patch)
tree9e19d74efc71996612d06e274b7778cb87aae0d3 /sys/ddb/db_output.c
parent1db55c25283f4e4167b5e249eadd1b3bbc269e59 (diff)
downloadsrc-da927f93bddf1ad22a83b3ca1b12cede71755465.tar.gz
src-da927f93bddf1ad22a83b3ca1b12cede71755465.zip
- Call db_setup_paging() for traceall.
- Make it so one can't call db_setup_paging() if it has already been called before. traceall needs this, or else the db_setup_paging() call from db_trace_thread() will reset the printed line number, and override its argument. This is not perfect for traceall, because even if one presses 'q' while in the middle of printing a backtrace it will finish printing the backtrace before exiting, as db_trace_thread() won't be notified it should stop, but it is hard to do better without reworking the pager interface a lot more.
Notes
Notes: svn path=/head/; revision=150842
Diffstat (limited to 'sys/ddb/db_output.c')
-rw-r--r--sys/ddb/db_output.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c
index 3a0fbc5b73d4..fccae29db765 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;
+ }
}
/*