diff options
author | Pedro Alves <palves@redhat.com> | 2009-03-22 17:57:11 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-03-22 17:57:11 +0000 |
commit | 41d2bdb467371e3a18ff8eb69859b1d7cb56a2bd (patch) | |
tree | 86d0544ca527fc6518ffde5506efa0fd5068613e /gdb/infrun.c | |
parent | 065a2c74b5aa7c28709928ca57aa49c2fb507079 (diff) | |
download | gdb-41d2bdb467371e3a18ff8eb69859b1d7cb56a2bd.zip gdb-41d2bdb467371e3a18ff8eb69859b1d7cb56a2bd.tar.gz gdb-41d2bdb467371e3a18ff8eb69859b1d7cb56a2bd.tar.bz2 |
* infcall.c (run_inferior_call): Remove references to
suppress_stop_observer.
* infcmd.c (suppress_stop_observer): Delete.
(finish_command_continuation): Remove NOTE. Don't clear
suppress_stop_observer anymore.
(finish_command_continuation_free_arg): Likewise.
(finish_forward): Remove references to suppress_stop_observer.
Call normal_stop observer if we haven't already.
* inferior.h (suppress_stop_observer): Delete.
* infrun.c (normal_stop): When deciding to suppress the
normal_stop observer, check for proceed_to_finish instead of
suppress_stop_observer.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index d774e32..8466ed6 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4433,11 +4433,25 @@ Further execution is probably impossible.\n")); done: annotate_stopped (); - if (!suppress_stop_observer - && !(target_has_execution - && last.kind != TARGET_WAITKIND_SIGNALLED - && last.kind != TARGET_WAITKIND_EXITED - && inferior_thread ()->step_multi)) + + /* Suppress the stop observer if we're in the middle of: + + - a step n (n > 1), as there still more steps to be done. + + - a "finish" command, as the observer will be called in + finish_command_continuation, so it can include the inferior + function's return value. + + - calling an inferior function, as we pretend we inferior didn't + run at all. The return value of the call is handled by the + expression evaluator, through call_function_by_hand. */ + + if (!target_has_execution + || last.kind == TARGET_WAITKIND_SIGNALLED + || last.kind == TARGET_WAITKIND_EXITED + || (!inferior_thread ()->step_multi + && !(inferior_thread ()->stop_bpstat + && inferior_thread ()->proceed_to_finish))) { if (!ptid_equal (inferior_ptid, null_ptid)) observer_notify_normal_stop (inferior_thread ()->stop_bpstat, |