mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
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.
This commit is contained in:
@ -6123,6 +6123,29 @@ linux_process_target::read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
linux_process_target::supports_get_tls_address ()
|
||||
{
|
||||
#ifdef USE_THREAD_DB
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
linux_process_target::get_tls_address (thread_info *thread,
|
||||
CORE_ADDR offset,
|
||||
CORE_ADDR load_module,
|
||||
CORE_ADDR *address)
|
||||
{
|
||||
#ifdef USE_THREAD_DB
|
||||
return thread_db_get_tls_address (thread, offset, load_module, address);
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
linux_qxfer_osdata (const char *annex,
|
||||
unsigned char *readbuf, unsigned const char *writebuf,
|
||||
@ -7392,11 +7415,6 @@ linux_get_hwcap2 (int wordsize)
|
||||
static linux_process_target the_linux_target;
|
||||
|
||||
static process_stratum_target linux_target_ops = {
|
||||
#ifdef USE_THREAD_DB
|
||||
thread_db_get_tls_address,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
hostio_last_error_from_errno,
|
||||
linux_qxfer_osdata,
|
||||
linux_xfer_siginfo,
|
||||
|
Reference in New Issue
Block a user