aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-11-20 13:08:16 +0000
committerPedro Alves <palves@redhat.com>2009-11-20 13:08:16 +0000
commitdb82e815be270306f875a1971408ad933c926cca (patch)
tree4d8590d7eaa86c2e736f55461e8a3e8ab2a02ec0 /gdb/infrun.c
parenteb6cdd53bf4a08e32c4538e5b0521a1aa68bd8ec (diff)
downloadgdb-db82e815be270306f875a1971408ad933c926cca.zip
gdb-db82e815be270306f875a1971408ad933c926cca.tar.gz
gdb-db82e815be270306f875a1971408ad933c926cca.tar.bz2
* infrun.c (handle_inferior_event): Hardware hatchpoint traps are
never random signals. * breakpoint.c (update_global_location_list): Always delete immediately delete hardware watchpoint locations and other locations whose target address isn't meaningful. Update comment explaining the hazard of moribund locations.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 3c17167..cb5278c 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3593,6 +3593,21 @@ targets should add new threads to the thread list themselves in non-stop mode.")
function. */
stop_print_frame = 1;
+ /* This is where we handle "moribund" watchpoints. Unlike
+ software breakpoints traps, hardware watchpoint traps are
+ always distinguishable from random traps. If no high-level
+ watchpoint is associated with the reported stop data address
+ anymore, then the bpstat does not explain the signal ---
+ simply make sure to ignore it if `stopped_by_watchpoint' is
+ set. */
+
+ if (debug_infrun
+ && ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP
+ && !bpstat_explains_signal (ecs->event_thread->stop_bpstat)
+ && stopped_by_watchpoint)
+ fprintf_unfiltered (gdb_stdlog, "\
+infrun: no user watchpoint explains watchpoint SIGTRAP, ignoring\n");
+
/* NOTE: cagney/2003-03-29: These two checks for a random signal
at one stage in the past included checks for an inferior
function call's call dummy's return breakpoint. The original
@@ -3616,6 +3631,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal
= !(bpstat_explains_signal (ecs->event_thread->stop_bpstat)
+ || stopped_by_watchpoint
|| ecs->event_thread->trap_expected
|| (ecs->event_thread->step_range_end
&& ecs->event_thread->step_resume_breakpoint == NULL));