Re-add the gdb command. It was removed to be replaced by something

more generic, but that didn't actually happen. Since the feature to
switch backends (and historically this means from DDB to GDB) is
important, make sure people can do just that until such the generic
mechanism actually sees the light of day.

Suggested by: rwatson@
This commit is contained in:
Marcel Moolenaar 2004-07-12 01:38:07 +00:00
parent 3bcd2440db
commit f3be7cb3e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132002

View File

@ -67,6 +67,7 @@ SET_DECLARE(db_cmd_set, struct command);
SET_DECLARE(db_show_cmd_set, struct command);
static db_cmdfcn_t db_fncall;
static db_cmdfcn_t db_gdb;
static db_cmdfcn_t db_kill;
static db_cmdfcn_t db_reset;
static db_cmdfcn_t db_watchdog;
@ -414,6 +415,7 @@ static struct command db_command_table[] = {
{ "call", db_fncall, CS_OWN, 0 },
{ "show", 0, 0, db_show_cmds },
{ "ps", db_ps, 0, 0 },
{ "gdb", db_gdb, 0, 0 },
{ "reset", db_reset, 0, 0 },
{ "kill", db_kill, CS_OWN, 0 },
{ "watchdog", db_watchdog, 0, 0 },
@ -611,3 +613,13 @@ db_watchdog(dummy1, dummy2, dummy3, dummy4)
EVENTHANDLER_INVOKE(watchdog_list, 0, &i);
}
static void
db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
{
if (kdb_dbbe_select("gdb") != 0)
db_printf("The remote GDB backend could not be selected.\n");
else
db_printf("Step to enter the remote GDB backend.\n");
}