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 | 6e3fd7e948d158a04c0af7130e6648ad75aaba66 (patch) | |
tree | cc8d41ef8c8b428c99f62ba37997117eeb19bb33 /gdbserver/server.cc | |
parent | 5203ae1e870191ef058c1b4590f9b9fbf6b594ed (diff) | |
download | gdb-6e3fd7e948d158a04c0af7130e6648ad75aaba66.zip gdb-6e3fd7e948d158a04c0af7130e6648ad75aaba66.tar.gz gdb-6e3fd7e948d158a04c0af7130e6648ad75aaba66.tar.bz2 |
gdbserver: turn target op 'get_tls_address' into a method
gdbserver/ChangeLog:
2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Turn process_stratum_target's get_tls_address 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_get_tls_address'.
* target.cc (process_target::get_tls_address): Define.
(process_target::supports_get_tls_address): Define.
Update the derived classes and callers below.
* server.cc (handle_query): Update.
* linux-low.cc (linux_target_ops): Update.
(linux_process_target::supports_get_tls_address): Define.
(linux_process_target::get_tls_address): Define.
* 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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbserver/server.cc b/gdbserver/server.cc index b4fd9c6..01d41af 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -2467,7 +2467,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) } /* Thread-local storage support. */ - if (the_target->get_tls_address != NULL + if (the_target->pt->supports_get_tls_address () && startswith (own_buf, "qGetTLSAddr:")) { char *p = own_buf + 12; @@ -2513,8 +2513,8 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) if (thread == NULL) err = 2; else - err = the_target->get_tls_address (thread, parts[0], parts[1], - &address); + err = the_target->pt->get_tls_address (thread, parts[0], parts[1], + &address); } if (err == 0) |