aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-09-08 21:46:21 +0000
committerPedro Alves <palves@redhat.com>2008-09-08 21:46:21 +0000
commit347bddb745acda8fb591511a547e66bbe00d768b (patch)
treee1ae89f31d0e51854b0454eaa75ec215a4c42191 /gdb/infcall.c
parent078130d0caa5d5ec686abe6ee5589a644885082a (diff)
downloadgdb-347bddb745acda8fb591511a547e66bbe00d768b.zip
gdb-347bddb745acda8fb591511a547e66bbe00d768b.tar.gz
gdb-347bddb745acda8fb591511a547e66bbe00d768b.tar.bz2
* inferior.h (stop_bpstat): Delete.
* breakpoint.h (bpstat_do_actions): Remove bpstat* argument. * breakpoint.c (bpstat_do_actions): Rename to ... (bpstat_do_actions_1): ... this. Make static. Change return type to int. Return true if a breakpoint proceeded. (bpstat_do_actions): New, as wrapper around bpstat_do_actions_1. (delete_breakpoint): Don't reference the global stop_bpstat; it's gone. * gdbthread.h (struct thread_info): Add stop_bpstat. (save_infrun_state, load_infrun_state): Remove stop_bpstat argument. * thread.c (load_infrun_state, save_infrun_state): Remove stop_bpstat argument, and the code referencing it. * infcall.c: Include "gdbthread.h". (call_function_by_hand): Adjust. * exceptions.c: Include "gdbthread.h". (throw_exception): Adjust. * infcmd.c (stop_bpstat): Delete. (continue_command): In all-stop, set the ignore count on the thread that reported the stop. In non-stop, set it on the current thread. (finish_command_continuation): Adjust. (program_info): Adjust. * infrun.c (clear_proceed_status): Adjust. (context_switch): Don't context-switch stop_bpstat. (handle_inferior_event): Adjust. (normal_stop): Adjust. (save_inferior_status, restore_inferior_status): Adjust. * inf-loop.c (inferior_event_handler): Remove parameter to bpstat_do_actions call. * top.c (command_loop): Remove parameter to bpstat_do_actions call. Call it unconditionally. * event-top.c (command_handler): Ditto. * python/python.c (execute_gdb_command): Ditto.
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r--gdb/infcall.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 559b4a2..ec8f732 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -35,6 +35,7 @@
#include "infcall.h"
#include "dummy-frame.h"
#include "ada-lang.h"
+#include "gdbthread.h"
/* NOTE: cagney/2003-04-16: What's the future of this code?
@@ -263,12 +264,13 @@ find_function_addr (struct value *function, struct type **retval_type)
}
/* Call breakpoint_auto_delete on the current contents of the bpstat
- pointed to by arg (which is really a bpstat *). */
+ of the current thread. */
static void
breakpoint_auto_delete_contents (void *arg)
{
- breakpoint_auto_delete (*(bpstat *) arg);
+ if (!ptid_equal (inferior_ptid, null_ptid))
+ breakpoint_auto_delete (inferior_thread ()->stop_bpstat);
}
static CORE_ADDR
@@ -712,7 +714,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
/* If all error()s out of proceed ended up calling normal_stop
(and perhaps they should; it already does in the special case
of error out of resume()), then we wouldn't need this. */
- make_cleanup (breakpoint_auto_delete_contents, &stop_bpstat);
+ make_cleanup (breakpoint_auto_delete_contents, NULL);
disable_watchpoints_before_interactive_call_start ();
proceed_to_finish = 1; /* We want stop_registers, please... */