diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2006-09-15 22:52:06 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2006-09-15 22:52:06 +0000 |
commit | 52d1b58b4985fa88bd34792783b663bc7ea25e9d (patch) | |
tree | 2774436670f0365e54e19b8a4fba2971cdb077c1 | |
parent | fe167e666f9612553b299ccde6afc87b1d9d0857 (diff) | |
download | gdb-52d1b58b4985fa88bd34792783b663bc7ea25e9d.tar.gz |
(call_function_by_hand): Destroy signal thread while
synchronous and then recreate.
-rw-r--r-- | gdb/infcall.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c index 3a1ad6aba7e..ab899a1bed8 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -36,6 +36,8 @@ #include "gdb_string.h" #include "infcall.h" #include "dummy-frame.h" +#include "async-nat-inferior.h" +#include "async-nat-sigthread.h" /* NOTE: cagney/2003-04-16: What's the future of this code? @@ -714,7 +716,7 @@ You must use a pointer to function type variable. Command ignored."), arg_name); Otherwise, set RC to 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 + executing it as this may not work. The dummy frame is popped 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). */ @@ -732,15 +734,22 @@ You must use a pointer to function type variable. Command ignored."), arg_name); proceed_to_finish = 1; /* We want stop_registers, please... */ if (target_can_async_p ()) - saved_async = target_async_mask (0); - + { + gdb_signal_thread_destroy (&gdb_status->signal_status); + saved_async = target_async_mask (0); + } + proceed (real_pc, TARGET_SIGNAL_0, 0); - + if (saved_async) - target_async_mask (saved_async); - + { + target_async_mask (saved_async); + gdb_signal_thread_create (&gdb_status->signal_status, + ptid_get_pid (inferior_ptid)); + } + enable_watchpoints_after_interactive_call_stop (); - + discard_cleanups (old_cleanups); } |