aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-01-24 21:31:24 +0000
committerTom Tromey <tromey@redhat.com>2012-01-24 21:31:24 +0000
commit09ac7c10d43e1cbbebdc90e9f7b044d34488f2ec (patch)
tree2c3742b49ef1f700752e854ca1070c96481248ad /gdb/infrun.c
parent86eb7e951a825be0c81726558621161edf6858e9 (diff)
downloadgdb-09ac7c10d43e1cbbebdc90e9f7b044d34488f2ec.zip
gdb-09ac7c10d43e1cbbebdc90e9f7b044d34488f2ec.tar.gz
gdb-09ac7c10d43e1cbbebdc90e9f7b044d34488f2ec.tar.bz2
2012-01-24 Pedro Alves <palves@redhat.com>
* breakpoint.c (bpstat_check_location, bpstat_stop_status, pc_at_non_inline_function): Add `ws' parameter, and pass it down. (breakpoint_hit_catch_fork, breakpoint_hit_catch_vfork) (breakpoint_hit_catch_syscall, breakpoint_hit_catch_exec): Add `ws' parameter. (breakpoint_hit_ranged_breakpoint): Add `ws' parameter. Return false for events other than TARGET_SIGNAL_TRAP. (breakpoint_hit_watchpoint, base_breakpoint_breakpoint_hit): Add `ws' parameter. (bkpt_breakpoint_hit): Add `ws' parameter. Return false for events other than TARGET_SIGNAL_TRAP. (tracepoint_breakpoint_hit): Add `ws' parameter. * breakpoint.h (struct breakpoint_ops) <breakpoint_hit>: Add `ws' parameter. (bpstat_stop_status): Same. (pc_at_non_inline_function): Same. * infrun.c (handle_syscall_event, handle_inferior_event): Adjust to pass the current event's waitstatus to bpstat_stop_status and pc_at_non_inline_function.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 24d2720..23a4bba 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3086,7 +3086,7 @@ handle_syscall_event (struct execution_control_state *ecs)
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_regcache_aspace (regcache),
- stop_pc, ecs->ptid);
+ stop_pc, ecs->ptid, &ecs->ws);
ecs->random_signal
= !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat);
@@ -3537,7 +3537,7 @@ handle_inferior_event (struct execution_control_state *ecs)
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
- stop_pc, ecs->ptid);
+ stop_pc, ecs->ptid, &ecs->ws);
/* Note that we're interested in knowing the bpstat actually
causes a stop, not just if it may explain the signal.
@@ -3635,7 +3635,7 @@ handle_inferior_event (struct execution_control_state *ecs)
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
- stop_pc, ecs->ptid);
+ stop_pc, ecs->ptid, &ecs->ws);
ecs->random_signal
= !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat);
@@ -4094,11 +4094,12 @@ handle_inferior_event (struct execution_control_state *ecs)
user had set a breakpoint on that inlined code, the missing
skip_inline_frames call would break things. Fortunately
that's an extremely unlikely scenario. */
- if (!pc_at_non_inline_function (aspace, stop_pc)
+ if (!pc_at_non_inline_function (aspace, stop_pc, &ecs->ws)
&& !(ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
&& ecs->event_thread->control.trap_expected
&& pc_at_non_inline_function (aspace,
- ecs->event_thread->prev_pc)))
+ ecs->event_thread->prev_pc,
+ &ecs->ws)))
skip_inline_frames (ecs->ptid);
}
@@ -4200,10 +4201,11 @@ handle_inferior_event (struct execution_control_state *ecs)
return;
}
- /* See if there is a breakpoint at the current PC. */
+ /* See if there is a breakpoint/watchpoint/catchpoint/etc. that
+ handles this event. */
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
- stop_pc, ecs->ptid);
+ stop_pc, ecs->ptid, &ecs->ws);
/* Following in case break condition called a
function. */