From d7abedf7e7d18c8a32f63b0e44bee4a4f3b581ba Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Mon, 17 Feb 2020 16:11:57 +0100 Subject: gdbserver: turn target op 'qxfer_siginfo' into a method gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur Turn process_stratum_target's qxfer_siginfo 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_qxfer_siginfo'. * target.cc (process_target::qxfer_siginfo): Define. (process_target::supports_qxfer_siginfo): Define. Update the derived classes and callers below. * server.cc (handle_qxfer_siginfo): Update. (handle_query): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_qxfer_siginfo): Define. (linux_xfer_siginfo): Turn into ... (linux_process_target::qxfer_siginfo): ... 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. --- gdbserver/linux-low.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'gdbserver/linux-low.cc') diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index 14a895d..552c735 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -6182,9 +6182,17 @@ siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction) } } -static int -linux_xfer_siginfo (const char *annex, unsigned char *readbuf, - unsigned const char *writebuf, CORE_ADDR offset, int len) +bool +linux_process_target::supports_qxfer_siginfo () +{ + return true; +} + +int +linux_process_target::qxfer_siginfo (const char *annex, + unsigned char *readbuf, + unsigned const char *writebuf, + CORE_ADDR offset, int len) { int pid; siginfo_t siginfo; @@ -7421,7 +7429,6 @@ linux_get_hwcap2 (int wordsize) static linux_process_target the_linux_target; static process_stratum_target linux_target_ops = { - linux_xfer_siginfo, linux_supports_non_stop, linux_async, linux_start_non_stop, -- cgit v1.1