aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-06-10 09:32:05 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-06-10 09:32:05 +0000
commitf5871ec07bfb6388317ec60513286c51ecd06733 (patch)
treefb1f870d48ce3d69743941437b5b563d65b1b653 /gdb/infcall.c
parent3d3191a6ad8488986858373778fb8edf7e02715d (diff)
downloadgdb-f5871ec07bfb6388317ec60513286c51ecd06733.zip
gdb-f5871ec07bfb6388317ec60513286c51ecd06733.tar.gz
gdb-f5871ec07bfb6388317ec60513286c51ecd06733.tar.bz2
Suppress normal stop observer when it's problematic.
* inferior.h (suppress_normal_stop_observer): New. * infcall.c (call_function_by_hand): Disable stop events when doing function calls. * infmcd.c (suppress_normal_stop_observer): New. (finish_command_continuation): Call normal_stop observer explicitly. (finish_command): Disable stop events inside proceed. * infrun.c (normal_stop): Don't call normal stop observer if suppressed of if multi-step is in progress.
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r--gdb/infcall.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index c065b59..ded3211 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -706,6 +706,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
{
struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0);
+ struct cleanup *old_cleanups2;
int saved_async = 0;
/* If all error()s out of proceed ended up calling normal_stop
@@ -718,8 +719,12 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
if (target_can_async_p ())
saved_async = target_async_mask (0);
-
+
+ old_cleanups2 = make_cleanup_restore_integer
+ (&suppress_normal_stop_observer);
+ suppress_normal_stop_observer = 1;
proceed (real_pc, TARGET_SIGNAL_0, 0);
+ do_cleanups (old_cleanups2);
if (saved_async)
target_async_mask (saved_async);