aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-01-29 17:52:47 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-01-29 17:52:47 +0000
commita5606eee5ec10851d09a8e2709354c7e0931a99c (patch)
tree74396fad6948f39a3d299b61354795949342468e /gdb/breakpoint.h
parent0b3de036ef7812900af73c59dae4a703fce5f2da (diff)
downloadgdb-a5606eee5ec10851d09a8e2709354c7e0931a99c.zip
gdb-a5606eee5ec10851d09a8e2709354c7e0931a99c.tar.gz
gdb-a5606eee5ec10851d09a8e2709354c7e0931a99c.tar.bz2
Use multiple locations for hardware watchpoints.
This eliminates the need to traverse value chain, doing various checks, in three different places. * breakpoint.h (struct bp_location): New fields lengths and watchpoint_type. (struct breakpoint): Remove the val_chain field. * breakpoint.c (is_hardware_watchpoint): New. (free_valchain): Remove. (update_watchpoint): New. (insert_bp_location): For hardware watchpoint, just directly insert it. (insert_breakpoints): Call update_watchpoint_locations on all watchpoints. If we have failed to insert any location of a hardware watchpoint, remove all inserted locations. (remove_breakpoint): For hardware watchpoints, directly remove location. (watchpoints_triggered): Iterate over locations. (bpstat_stop_status): Use only first location of a resource watchpoint. (delete_breakpoint): Don't call free_valchain. (print_one_breakpoint): Don't print all locations for watchpoints. (breakpoint_re_set_one): Use update_watchpoint for watchpoints.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 91667ab..7b72e19 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -273,6 +273,12 @@ struct bp_location
bp_loc_other. */
CORE_ADDR address;
+ /* For hardware watchpoints, the size of data ad ADDRESS being watches. */
+ int length;
+
+ /* Type of hardware watchpoint. */
+ enum target_hw_bp_type watchpoint_type;
+
/* For any breakpoint type with an address, this is the BFD section
associated with the address. Used primarily for overlay debugging. */
asection *section;
@@ -388,9 +394,6 @@ struct breakpoint
/* Value of the watchpoint the last time we checked it. */
struct value *val;
- /* Holds the value chain for a hardware watchpoint expression. */
- struct value *val_chain;
-
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
of a related breakpoint be useful elsewhere, if not just call