aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/target.h
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-17 16:11:56 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-20 17:35:09 +0100
commit6e3fd7e948d158a04c0af7130e6648ad75aaba66 (patch)
treecc8d41ef8c8b428c99f62ba37997117eeb19bb33 /gdbserver/target.h
parent5203ae1e870191ef058c1b4590f9b9fbf6b594ed (diff)
downloadgdb-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/target.h')
-rw-r--r--gdbserver/target.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/gdbserver/target.h b/gdbserver/target.h
index 5cf039e..2c818b3 100644
--- a/gdbserver/target.h
+++ b/gdbserver/target.h
@@ -70,15 +70,6 @@ class process_target;
shared code. */
struct process_stratum_target
{
- /* Fetch the address associated with a specific thread local storage
- area, determined by the specified THREAD, OFFSET, and LOAD_MODULE.
- Stores it in *ADDRESS and returns zero on success; otherwise returns
- an error code. A return value of -1 means this system does not
- support the operation. */
-
- int (*get_tls_address) (struct thread_info *thread, CORE_ADDR offset,
- CORE_ADDR load_module, CORE_ADDR *address);
-
/* Fill BUF with an hostio error packet representing the last hostio
error. */
void (*hostio_last_error) (char *buf);
@@ -477,6 +468,17 @@ public:
needed for uclinux where the executable is relocated during load
time. */
virtual int read_offsets (CORE_ADDR *text, CORE_ADDR *data);
+
+ /* Return true if the get_tls_address target op is supported. */
+ virtual bool supports_get_tls_address ();
+
+ /* Fetch the address associated with a specific thread local storage
+ area, determined by the specified THREAD, OFFSET, and LOAD_MODULE.
+ Stores it in *ADDRESS and returns zero on success; otherwise returns
+ an error code. A return value of -1 means this system does not
+ support the operation. */
+ virtual int get_tls_address (thread_info *thread, CORE_ADDR offset,
+ CORE_ADDR load_module, CORE_ADDR *address);
};
extern process_stratum_target *the_target;