summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-07-12 01:38:07 +0000
committermarcel <marcel@FreeBSD.org>2004-07-12 01:38:07 +0000
commitc952cbd124d847d47362c33252cead8e861e7066 (patch)
treeeabfe3ed2f31f3c226898abb41a4e9d9f8429643 /sys/ddb
parentbfbf13730c3642d62a98570647d76bcf47e81066 (diff)
downloadFreeBSD-src-c952cbd124d847d47362c33252cead8e861e7066.zip
FreeBSD-src-c952cbd124d847d47362c33252cead8e861e7066.tar.gz
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@
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_command.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 954a0d3..30740ab 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -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");
+}
OpenPOWER on IntegriCloud