forked from Imagelibrary/binutils-gdb
gdbserver: turn target op 'get_tib_address' into a method
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's get_tib_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_tib_address'. * target.cc (process_target::get_tib_address): Define. (process_target::supports_get_tib_address): Define. Update the derived classes and callers below. * server.cc (handle_query): Update. * linux-low.cc (win32_target_ops): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update. (win32_process_target::supports_get_tib_address): Define. (win32_get_tib_address): Turn into ... (win32_process_target::get_tib_address): ... this. * win32-low.h (class win32_process_target): Update.
This commit is contained in:
@@ -2532,7 +2532,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
|
||||
}
|
||||
|
||||
/* Windows OS Thread Information Block address support. */
|
||||
if (the_target->get_tib_address != NULL
|
||||
if (the_target->pt->supports_get_tib_address ()
|
||||
&& startswith (own_buf, "qGetTIBAddr:"))
|
||||
{
|
||||
const char *annex;
|
||||
@@ -2540,7 +2540,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
|
||||
CORE_ADDR tlb;
|
||||
ptid_t ptid = read_ptid (own_buf + 12, &annex);
|
||||
|
||||
n = (*the_target->get_tib_address) (ptid, &tlb);
|
||||
n = the_target->pt->get_tib_address (ptid, &tlb);
|
||||
if (n == 1)
|
||||
{
|
||||
strcpy (own_buf, paddress(tlb));
|
||||
|
||||
Reference in New Issue
Block a user