summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2002-12-17 01:32:11 +0000
committernjl <njl@FreeBSD.org>2002-12-17 01:32:11 +0000
commit595fed56c73a275eb570569111adbb62a317d8de (patch)
tree3973f1a27b08a2e9a74dc6938dcb8d663535f9a1 /sys/amd64
parent5ff92d6b51c7694f67c11138e1b29acd344333f3 (diff)
downloadFreeBSD-src-595fed56c73a275eb570569111adbb62a317d8de.zip
FreeBSD-src-595fed56c73a275eb570569111adbb62a317d8de.tar.gz
Automatically issue a "continue" along with the "detach" command. This
fixes the problem of cleanly restarting a target after entering gdb mode. Reviewed by: archie@
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/amd64-gdbstub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c
index fd283bd..863c676 100644
--- a/sys/amd64/amd64/amd64-gdbstub.c
+++ b/sys/amd64/amd64/amd64-gdbstub.c
@@ -504,7 +504,7 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
case 'D': /* detach; say OK and turn off gdb */
putpacket(remcomOutBuffer);
boothowto &= ~RB_GDB;
- return 0;
+ goto cont_exit;
case 'g': /* return the value of the CPU registers */
mem2hex ((vm_offset_t)&registers, remcomOutBuffer, NUMREGBYTES);
@@ -579,7 +579,7 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
if (hexToInt(&ptr,&addr))
registers.eip = addr;
-
+cont_exit:
/* set the trace bit if we're stepping */
if (remcomInBuffer[0] == 's')
registers.eflags |= PSL_T;
OpenPOWER on IntegriCloud