diff options
author | Jason Molenda <jmolenda@apple.com> | 2000-02-01 03:19:29 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2000-02-01 03:19:29 +0000 |
commit | da59e08184255e09e51e54bb356e4448d33b2245 (patch) | |
tree | 7b31845d077b659d43f8a6597270e121c75f77e4 /gdb/infcmd.c | |
parent | 557537a5563f40d36fb91d03551da70f4b0faf34 (diff) | |
download | gdb-da59e08184255e09e51e54bb356e4448d33b2245.zip gdb-da59e08184255e09e51e54bb356e4448d33b2245.tar.gz gdb-da59e08184255e09e51e54bb356e4448d33b2245.tar.bz2 |
import gdb-2000-01-31 snapshot
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e61221a..082d957 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -838,8 +838,13 @@ breakpoint_auto_delete_contents (arg) The dummy's frame is automatically popped whenever that break is hit. If that is the first time the program stops, run_stack_dummy returns to its caller with that frame already gone and returns 0. - Otherwise, run_stack-dummy returns 1 (the frame will eventually be popped - when we do hit that breakpoint). */ + + Otherwise, run_stack-dummy returns a non-zero value. + If the called function receives a random signal, we do not allow the user + to continue executing it as this may not work. The dummy frame is poped + and we return 1. + If we hit a breakpoint, we leave the frame in place and return 2 (the frame + will eventually be popped when we do hit the dummy end breakpoint). */ int run_stack_dummy (addr, buffer) @@ -907,10 +912,24 @@ run_stack_dummy (addr, buffer) discard_cleanups (old_cleanups); + if (stopped_by_random_signal) + { + /* If the inferior execution fails we need to restore our + stack. It is not done by proceed() in this case. */ + /* Pop the empty frame that contains the stack dummy. + POP_FRAME ends with a setting of the current frame, so we + can use that next. */ + POP_FRAME; + return 1; + } + + /* We may also stop prematurely because we hit a breakpoint in the + called routine. We do not pop the frame as the user may wish + to single step or continue from there. */ if (!stop_stack_dummy) - return 1; + return 2; - /* On return, the stack dummy has been popped already. */ + /* On normal return, the stack dummy has been popped already. */ memcpy (buffer, stop_registers, REGISTER_BYTES); return 0; |