aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2022-05-12 19:43:53 +0100
committerPedro Alves <pedro@palves.net>2022-05-20 20:41:01 +0100
commit6e14e4412b670d093d74b90e5d4adcfaedb76d3f (patch)
tree6dbe99cd35f96fb8a22d1e1a5f6ebe722f17ab9a /gdb/breakpoint.h
parent249dfeafc96db9d36ea8c22f0ae3c3eb5b76b5ba (diff)
downloadbinutils-6e14e4412b670d093d74b90e5d4adcfaedb76d3f.zip
binutils-6e14e4412b670d093d74b90e5d4adcfaedb76d3f.tar.gz
binutils-6e14e4412b670d093d74b90e5d4adcfaedb76d3f.tar.bz2
Make breakpoint_address_bits look at the location kind
Software watchpoints allocate a special dummy location using software_watchpoint_add_no_memory_location, and then breakpoint_address_bits checks whether the location is that special location to decide whether the location has a meaninful address to print. Introduce a new bp_loc_software_watchpoint location kind, and make breakpoint_address_bits use bl_address_is_meaningful instead, which returns false for bp_loc_other, which is in accordance with we document for bp_location::address: /* (... snip ...) Valid for all types except bp_loc_other. */ CORE_ADDR address = 0; Rename software_watchpoint_add_no_memory_location to add_dummy_location, and simplify it. This will be used by catchpoints too in a following patch. Note that neither "info breakpoints" nor "maint info breakpoints" actually prints the addresses of watchpoints, but I think it would be useful to do so in "maint info breakpoints". This approach let's us implement that in the future. Change-Id: I50e398f66ef618c31ffa662da755eaba6295aed7
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index a4ead8b..7375e97 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -314,6 +314,7 @@ enum bp_loc_type
{
bp_loc_software_breakpoint,
bp_loc_hardware_breakpoint,
+ bp_loc_software_watchpoint,
bp_loc_hardware_watchpoint,
bp_loc_other /* Miscellaneous... */
};