diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c index 863c676fe180..fd283bd96f9a 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; - goto cont_exit; + return 0; case 'g': /* return the value of the CPU registers */ mem2hex ((vm_offset_t)®isters, 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; diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c index 863c676fe180..fd283bd96f9a 100644 --- a/sys/i386/i386/i386-gdbstub.c +++ b/sys/i386/i386/i386-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; - goto cont_exit; + return 0; case 'g': /* return the value of the CPU registers */ mem2hex ((vm_offset_t)®isters, 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;