diff options
author | bde <bde@FreeBSD.org> | 1998-02-13 02:19:29 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-02-13 02:19:29 +0000 |
commit | e159c8ff9735b3dbd503e2695d5b6f040140ce03 (patch) | |
tree | e6d877a03bcdb603b973e9b9ce816f4db67c40b7 /sys/ddb/db_command.c | |
parent | 9461b07207276f197a45e7ed0bc94bda8106f779 (diff) | |
download | FreeBSD-src-e159c8ff9735b3dbd503e2695d5b6f040140ce03.zip FreeBSD-src-e159c8ff9735b3dbd503e2695d5b6f040140ce03.tar.gz |
Ensure that the linker sets for commands exist by putting a standard
command in each of them. This removes the need for hard-to-configure
dummy instantiations of the sets.
Diffstat (limited to 'sys/ddb/db_command.c')
-rw-r--r-- | sys/ddb/db_command.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 0f62f88..63a89bb 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_command.c,v 1.23 1997/02/22 09:28:21 peter Exp $ + * $Id: db_command.c,v 1.24 1998/02/09 06:07:52 eivind Exp $ */ /* @@ -49,12 +49,8 @@ /* * Exported global variables */ -/* - * XXX when db_command is actually used, it will be generated by the linker. - * Then it should be declared extern. - */ -static struct linker_set db_cmd_set; boolean_t db_cmd_loop_done; +extern struct linker_set db_cmd_set; db_addr_t db_dot; jmp_buf db_jmpbuf; db_addr_t db_last_addr; @@ -64,7 +60,6 @@ extern struct linker_set db_show_cmd_set; static db_cmdfcn_t db_fncall; static db_cmdfcn_t db_gdb; -static db_cmdfcn_t db_panic; /* XXX this is actually forward-static. */ extern struct command db_show_cmds[]; @@ -374,7 +369,6 @@ static struct command db_show_cmds[] = { { "all", 0, 0, db_show_all_cmds }, { "registers", db_show_regs, 0, 0 }, { "breaks", db_listbreak_cmd, 0, 0 }, - { "watches", db_listwatch_cmd, 0, 0 }, #if 0 { "thread", db_show_one_thread, 0, 0 }, #endif @@ -409,7 +403,6 @@ static struct command db_command_table[] = { { "call", db_fncall, CS_OWN, 0 }, { "show", 0, 0, db_show_cmds }, { "ps", db_ps, 0, 0 }, - { "panic", db_panic, 0, 0 }, { "gdb", db_gdb, 0, 0 }, { (char *)0, } }; @@ -430,12 +423,11 @@ db_help_cmd() } #endif -static void -db_panic(dummy1, dummy2, dummy3, dummy4) - db_expr_t dummy1; - boolean_t dummy2; - db_expr_t dummy3; - char * dummy4; +/* + * At least one non-optional command must be implemented using + * DB_COMMAND() so that db_cmd_set gets created. Here is one. + */ +DB_COMMAND(panic, db_panic) { panic("from debugger"); } |