aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-06-22 19:46:40 +0000
committerJeff Johnston <jjohnstn@redhat.com>2004-06-22 19:46:40 +0000
commit46587c4207a56d8b3011c2ccb640bf31fedfbe58 (patch)
tree830b1e4565fea0e25df3d909ade83f2de1a4346b /gdb
parentaef68c486969aee4fa8ce103c4aea2fe5c02c389 (diff)
downloadgdb-46587c4207a56d8b3011c2ccb640bf31fedfbe58.zip
gdb-46587c4207a56d8b3011c2ccb640bf31fedfbe58.tar.gz
gdb-46587c4207a56d8b3011c2ccb640bf31fedfbe58.tar.bz2
2004-06-22 Jeff Johnston <jjohnstn@redhat.com>
* infrun.c (handle_inferior_event): Initialize stopped_by_watchpoint to -1. * breakpoint.c (bpstat_stop_status): Move check for ignoring untriggered watchpoints to a separate if clause. Update function comment regarding STOPPED_BY_WATCHPOINT argument.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/breakpoint.c28
-rw-r--r--gdb/infrun.c2
3 files changed, 28 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 01ecd5c..da23293 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * infrun.c (handle_inferior_event): Initialize stopped_by_watchpoint
+ to -1.
+ * breakpoint.c (bpstat_stop_status): Move check for ignoring
+ untriggered watchpoints to a separate if clause. Update function
+ comment regarding STOPPED_BY_WATCHPOINT argument.
+
2004-06-22 Jim Blandy <jimb@redhat.com>
* gdbarch.sh: Doc fix.
@@ -148,6 +156,7 @@
* cli/cli-cmds.c (disassemble_command): Update.
* vax-tdep.c (vax_gdbarch_init): Update.
+>>>>>>> 1.6028
2004-06-18 Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_collect_fpregset): Fix comment.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index b9386f0..336264d 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2559,8 +2559,9 @@ which its expression is valid.\n");
}
/* Get a bpstat associated with having just stopped at address
- BP_ADDR in thread PTID. STOPPED_BY_WATCHPOINT is true if the
- target thinks we stopped due to a hardware watchpoint. */
+ BP_ADDR in thread PTID. STOPPED_BY_WATCHPOINT is 1 if the
+ target thinks we stopped due to a hardware watchpoint, 0 if we
+ know we did not trigger a hardware watchpoint, and -1 if we do not know. */
/* Determine whether we stopped at a breakpoint, etc, or whether we
don't understand this stop. Result is a chain of bpstat's such that:
@@ -2593,15 +2594,10 @@ bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid, int stopped_by_watchpoint)
if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
continue;
- /* Hardware watchpoints are treated as non-existent if the reason we
- stopped wasn't a hardware watchpoint (we didn't stop on some data
- address). Otherwise gdb won't stop on a break instruction in the code
- (not from a breakpoint) when a hardware watchpoint has been defined. */
if (b->type != bp_watchpoint
- && !((b->type == bp_hardware_watchpoint
- || b->type == bp_read_watchpoint
- || b->type == bp_access_watchpoint)
- && stopped_by_watchpoint)
+ && b->type != bp_hardware_watchpoint
+ && b->type != bp_read_watchpoint
+ && b->type != bp_access_watchpoint
&& b->type != bp_hardware_breakpoint
&& b->type != bp_catch_fork
&& b->type != bp_catch_vfork
@@ -2617,6 +2613,18 @@ bpstat_stop_status (CORE_ADDR bp_addr, ptid_t ptid, int stopped_by_watchpoint)
continue;
}
+ /* Continuable hardware watchpoints are treated as non-existent if the
+ reason we stopped wasn't a hardware watchpoint (we didn't stop on
+ some data address). Otherwise gdb won't stop on a break instruction
+ in the code (not from a breakpoint) when a hardware watchpoint has
+ been defined. */
+
+ if ((b->type == bp_hardware_watchpoint
+ || b->type == bp_read_watchpoint
+ || b->type == bp_access_watchpoint)
+ && !stopped_by_watchpoint)
+ continue;
+
if (b->type == bp_hardware_breakpoint)
{
if (b->loc->address != bp_addr)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4581646..e7af5d9 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1252,7 +1252,7 @@ handle_inferior_event (struct execution_control_state *ecs)
defined in the file "config/pa/nm-hppah.h", accesses the variable
indirectly. Mutter something rude about the HP merge. */
int sw_single_step_trap_p = 0;
- int stopped_by_watchpoint = 0;
+ int stopped_by_watchpoint = -1; /* Mark as unknown. */
/* Cache the last pid/waitstatus. */
target_last_wait_ptid = ecs->ptid;