diff options
Diffstat (limited to 'sys/gdb/gdb_packet.c')
-rw-r--r-- | sys/gdb/gdb_packet.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/gdb/gdb_packet.c b/sys/gdb/gdb_packet.c index d3e5a0a..a62cc8d 100644 --- a/sys/gdb/gdb_packet.c +++ b/sys/gdb/gdb_packet.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/ctype.h> #include <sys/kdb.h> +#include <sys/ttydefaults.h> #include <machine/gdb_machdep.h> #include <machine/kdb.h> @@ -60,6 +61,17 @@ gdb_getc(void) do c = gdb_cur->gdb_getc(); while (c == -1); + + if (c == CTRL('C')) { + printf("Received ^C; trying to switch back to ddb.\n"); + + if (kdb_dbbe_select("ddb") != 0) + printf("The ddb backend could not be selected.\n"); + else { + printf("using longjmp, hope it works!\n"); + kdb_reenter(); + } + } return (c); } |