forked from Imagelibrary/binutils-gdb
gdbserver: turn target ops 'stopped_by_watchpoint' and 'stopped_data_address' into methods
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's stopped_by_watchpoint and stopped_data_address ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. * target.cc (process_target::stopped_by_watchpoint): Define. (process_target::stopped_data_address): Define. Update the derived classes and callers below. * remote-utils.cc (prepare_resume_reply): Update. * linux-low.cc (linux_target_ops): Update. (linux_stopped_by_watchpoint): Turn into ... (linux_process_target::stopped_by_watchpoint): ... this. (linux_stopped_data_address): Turn into ... (linux_process_target::stopped_data_address): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. (nto_stopped_by_watchpoint): Turn into ... (nto_process_target::stopped_by_watchpoint): ... this. (nto_stopped_data_address): Turn into ... (nto_process_target::stopped_data_address): ... this. * nto-low.h (class nto_process_target): Update. * win32-low.cc (win32_target_ops): Update. (win32_stopped_by_watchpoint): Turn into ... (win32_process_target::stopped_by_watchpoint): ... this. (win32_stopped_data_address): Turn into ... (win32_process_target::stopped_data_address): ... this. * win32-low.h (class win32_process_target): Update.
This commit is contained in:
@@ -70,15 +70,6 @@ class process_target;
|
||||
shared code. */
|
||||
struct process_stratum_target
|
||||
{
|
||||
/* Returns 1 if target was stopped due to a watchpoint hit, 0 otherwise. */
|
||||
|
||||
int (*stopped_by_watchpoint) (void);
|
||||
|
||||
/* Returns the address associated with the watchpoint that hit, if any;
|
||||
returns 0 otherwise. */
|
||||
|
||||
CORE_ADDR (*stopped_data_address) (void);
|
||||
|
||||
/* Reports the text, data offsets of the executable. This is
|
||||
needed for uclinux where the executable is relocated during load
|
||||
time. */
|
||||
@@ -476,6 +467,14 @@ public:
|
||||
|
||||
/* Returns true if the target can do hardware single step. */
|
||||
virtual bool supports_hardware_single_step ();
|
||||
|
||||
/* Returns true if target was stopped due to a watchpoint hit, false
|
||||
otherwise. */
|
||||
virtual bool stopped_by_watchpoint ();
|
||||
|
||||
/* Returns the address associated with the watchpoint that hit, if any;
|
||||
returns 0 otherwise. */
|
||||
virtual CORE_ADDR stopped_data_address ();
|
||||
};
|
||||
|
||||
extern process_stratum_target *the_target;
|
||||
|
||||
Reference in New Issue
Block a user