diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-02-17 16:11:56 +0100 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-02-20 17:35:09 +0100 |
commit | 5203ae1e870191ef058c1b4590f9b9fbf6b594ed (patch) | |
tree | 3e007efaed194549c0aa7c25797e200cb0ba348a /gdbserver/server.cc | |
parent | 6eeb5c5531f0238d367a2f3f1520ae3e2401f7ea (diff) | |
download | gdb-5203ae1e870191ef058c1b4590f9b9fbf6b594ed.zip gdb-5203ae1e870191ef058c1b4590f9b9fbf6b594ed.tar.gz gdb-5203ae1e870191ef058c1b4590f9b9fbf6b594ed.tar.bz2 |
gdbserver: turn target op 'read_offsets' into a method
gdbserver/ChangeLog:
2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Turn process_stratum_target's read_offsets op into a method of
process_target.
* target.h (struct process_stratum_target): Remove the target op.
(class process_target): Add the target op. Also add
'supports_read_offsets'.
* target.cc (process_target::read_offsets): Define.
(process_target::supports_read_offsets): Define.
Update the derived classes and callers below.
* server.cc (handle_query): Update.
* linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
(linux_target_ops): Update.
(linux_process_target::supports_read_offsets): Define.
(linux_read_offsets): Turn into ...
(linux_process_target::read_offsets): ... this.
* linux-low.h (class linux_process_target): Update.
* lynx-low.cc (lynx_target_ops): Update.
* nto-low.cc (nto_target_ops): Update.
* win32-low.cc (win32_target_ops): Update.
Diffstat (limited to 'gdbserver/server.cc')
-rw-r--r-- | gdbserver/server.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdbserver/server.cc b/gdbserver/server.cc index f13061c..b4fd9c6 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -2234,13 +2234,13 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) } } - if (the_target->read_offsets != NULL + if (the_target->pt->supports_read_offsets () && strcmp ("qOffsets", own_buf) == 0) { CORE_ADDR text, data; require_running_or_return (own_buf); - if (the_target->read_offsets (&text, &data)) + if (the_target->pt->read_offsets (&text, &data)) sprintf (own_buf, "Text=%lX;Data=%lX;Bss=%lX", (long)text, (long)data, (long)data); else |