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/target.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gdbserver/target.h') diff --git a/gdbserver/target.h b/gdbserver/target.h index 53f88a0..1ad0005 100644 --- a/gdbserver/target.h +++ b/gdbserver/target.h @@ -70,11 +70,6 @@ class process_target; shared code. */ struct process_stratum_target { - /* Read/Write extra signal info. */ - int (*qxfer_siginfo) (const char *annex, unsigned char *readbuf, - unsigned const char *writebuf, - CORE_ADDR offset, int len); - int (*supports_non_stop) (void); /* Enables async target events. Returns the previous enable @@ -482,6 +477,14 @@ public: virtual int qxfer_osdata (const char *annex, unsigned char *readbuf, unsigned const char *writebuf, CORE_ADDR offset, int len); + + /* Return true if the qxfer_siginfo target op is supported. */ + virtual bool supports_qxfer_siginfo (); + + /* Read/Write extra signal info. */ + virtual int qxfer_siginfo (const char *annex, unsigned char *readbuf, + unsigned const char *writebuf, + CORE_ADDR offset, int len); }; extern process_stratum_target *the_target; -- cgit v1.1