From: Hannes Domani Date: Mon, 26 Jan 2026 18:34:16 +0000 (+0100) Subject: gdbserver: Update win32_target_ops to new stopped_data_addresses interface X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f99f2ad19b511eca5b03b3c73750f8a7ced89e5;p=thirdparty%2Fbinutils-gdb.git gdbserver: Update win32_target_ops to new stopped_data_addresses interface It will be used by the aarch64 port. Approved-By: Tom Tromey --- diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc index e5149c1acc6..dfdbbf872dd 100644 --- a/gdbserver/win32-i386-low.cc +++ b/gdbserver/win32-i386-low.cc @@ -209,13 +209,13 @@ x86_stopped_by_watchpoint (void) return x86_dr_stopped_by_watchpoint (&debug_reg_state); } -static CORE_ADDR -x86_stopped_data_address (void) +static std::vector +x86_stopped_data_addresses () { CORE_ADDR addr; if (x86_dr_stopped_data_address (&debug_reg_state, &addr)) - return addr; - return 0; + return { addr }; + return {}; } static void @@ -637,5 +637,5 @@ struct win32_target_ops the_low_target = { i386_insert_point, i386_remove_point, x86_stopped_by_watchpoint, - x86_stopped_data_address + x86_stopped_data_addresses, }; diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index d75bdc0fde4..fb4da6488db 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -243,8 +243,8 @@ win32_process_target::stopped_by_watchpoint () std::vector win32_process_target::stopped_data_addresses () { - if (the_low_target.stopped_data_address != NULL) - return { the_low_target.stopped_data_address () }; + if (the_low_target.stopped_data_addresses != nullptr) + return the_low_target.stopped_data_addresses (); else return {}; } diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index bc7246576da..2196376fccb 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -90,7 +90,7 @@ struct win32_target_ops int (*remove_point) (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp); int (*stopped_by_watchpoint) (void); - CORE_ADDR (*stopped_data_address) (void); + std::vector (*stopped_data_addresses) (); }; extern struct win32_target_ops the_low_target;