aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 9d3e1b7..32c6a34 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -6889,16 +6889,26 @@ handle_signal_stop (struct execution_control_state *ecs)
("stop_pc=%s", paddress (reg_gdbarch, ecs->event_thread->stop_pc ()));
if (target_stopped_by_watchpoint ())
{
- CORE_ADDR addr;
+ auto inf_target = current_inferior ()->top_target ();
+ std::vector<CORE_ADDR> addr_list
+ = target_stopped_data_addresses (inf_target);
- infrun_debug_printf ("stopped by watchpoint");
-
- if (target_stopped_data_address (current_inferior ()->top_target (),
- &addr))
- infrun_debug_printf ("stopped data address=%s",
- paddress (reg_gdbarch, addr));
+ std::string addr_str;
+ if (addr_list.empty ())
+ addr_str = "(no data addressses available)";
else
- infrun_debug_printf ("(no data address available)");
+ {
+ for (const CORE_ADDR addr : addr_list)
+ {
+ if (addr_str.length () > 0)
+ addr_str += ", ";
+
+ addr_str += paddress (reg_gdbarch, addr);
+ }
+ }
+
+ infrun_debug_printf ("stopped by watchpoint, data addresses = %s",
+ addr_str.c_str ());
}
}