summaryrefslogtreecommitdiffstats
path: root/sys/ddb/ddb.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-07-12 21:22:44 +0000
committerjhb <jhb@FreeBSD.org>2006-07-12 21:22:44 +0000
commita72b0bcd7fd4baed9952beefc6398b3d79c789d9 (patch)
treef2aff187736391b024e6cf6f28e95e5708a2d927 /sys/ddb/ddb.h
parent883bd6a55eef6005b2e79ccc0c939a365bebb656 (diff)
downloadFreeBSD-src-a72b0bcd7fd4baed9952beefc6398b3d79c789d9.zip
FreeBSD-src-a72b0bcd7fd4baed9952beefc6398b3d79c789d9.tar.gz
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.
Diffstat (limited to 'sys/ddb/ddb.h')
-rw-r--r--sys/ddb/ddb.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index 549e24e..716740b 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -52,8 +52,6 @@ int DB_CALL(db_expr_t, db_expr_t *, int, db_expr_t[]);
typedef void db_cmdfcn_t(db_expr_t addr, boolean_t have_addr, db_expr_t count,
char *modif);
-typedef void db_page_calloutfcn_t(void *arg);
-
#define DB_COMMAND(cmd_name, func_name) \
DB_FUNC(cmd_name, func_name, db_cmd_set, 0, NULL)
#define DB_SHOW_COMMAND(cmd_name, func_name) \
@@ -85,6 +83,7 @@ extern int db_indent;
extern int db_inst_count;
extern int db_load_count;
extern int db_store_count;
+extern volatile int db_pager_quit;
extern db_expr_t db_radix;
extern db_expr_t db_max_width;
extern db_expr_t db_tab_stop_width;
@@ -118,8 +117,6 @@ int db_readline(char *lstart, int lsize);
void db_restart_at_pc(boolean_t watchpt);
int db_set_variable(db_expr_t value);
void db_set_watchpoints(void);
-void db_setup_paging(db_page_calloutfcn_t *callout, void *arg,
- int maxlines);
void db_skip_to_eol(void);
boolean_t db_stop_at_pc(boolean_t *is_breakpoint);
#define db_strcpy strcpy
@@ -149,8 +146,6 @@ db_cmdfcn_t db_trace_until_matching_cmd;
db_cmdfcn_t db_watchpoint_cmd;
db_cmdfcn_t db_write_cmd;
-db_page_calloutfcn_t db_simple_pager;
-
/*
* Command table.
*/
OpenPOWER on IntegriCloud