aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/linux-low.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-04-02 15:11:28 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-04-02 15:11:28 +0200
commitcb63de7ca804e4178a48dc500423bcb89726d893 (patch)
tree5bddea0fd2ff0ca90cb0ab0a39c36b4fbb82eb27 /gdbserver/linux-low.cc
parentb35db73327cf54445a20533305fcf705e88a520b (diff)
downloadgdb-cb63de7ca804e4178a48dc500423bcb89726d893.zip
gdb-cb63de7ca804e4178a48dc500423bcb89726d893.tar.gz
gdb-cb63de7ca804e4178a48dc500423bcb89726d893.tar.bz2
gdbserver/linux-low: turn 'siginfo_fixup' into a method
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn the 'siginfo_fixup' linux target op into a method of linux_process_target. * linux-low.h (struct linux_target_ops): Remove the op. (class linux_process_target) <siginfo_fixup> <low_siginfo_fixup>: Declare. * linux-low.cc (siginfo_fixup): Turn into... (linux_process_target::siginfo_fixup): ...this. (linux_process_target::low_siginfo_fixup): Define. * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare. (x86_siginfo_fixup): Turn into... (x86_target::low_siginfo_fixup): ...this. (the_low_target): Remove the op field. * linux-aarch64-low.cc (class aarch64_target): <low_siginfo_fixup>: Declare. (aarch64_linux_siginfo_fixup): Turn into... (aarch64_target::low_siginfo_fixup): ...this. (the_low_target): Remove the op field. * linux-arm-low.cc (the_low_target): Remove the op field. * linux-bfin-low.cc (the_low_target): Ditto. * linux-crisv32-low.cc (the_low_target): Ditto. * linux-m32r-low.cc (the_low_target): Ditto. * linux-m68k-low.cc (the_low_target): Ditto. * linux-mips-low.cc (the_low_target): Ditto. * linux-ppc-low.cc (the_low_target): Ditto. * linux-s390-low.cc (the_low_target): Ditto. * linux-sh-low.cc (the_low_target): Ditto. * linux-tic6x-low.cc (the_low_target): Ditto. * linux-tile-low.cc (the_low_target): Ditto. * linux-xtensa-low.cc (the_low_target): Ditto.
Diffstat (limited to 'gdbserver/linux-low.cc')
-rw-r--r--gdbserver/linux-low.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 658ea32..755c3e0 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6016,16 +6016,11 @@ linux_process_target::qxfer_osdata (const char *annex,
return linux_common_xfer_osdata (annex, readbuf, offset, len);
}
-/* Convert a native/host siginfo object, into/from the siginfo in the
- layout of the inferiors' architecture. */
-
-static void
-siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
+void
+linux_process_target::siginfo_fixup (siginfo_t *siginfo,
+ gdb_byte *inf_siginfo, int direction)
{
- int done = 0;
-
- if (the_low_target.siginfo_fixup != NULL)
- done = the_low_target.siginfo_fixup (siginfo, inf_siginfo, direction);
+ bool done = low_siginfo_fixup (siginfo, inf_siginfo, direction);
/* If there was no callback, or the callback didn't do anything,
then just do a straight memcpy. */
@@ -6039,6 +6034,13 @@ siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
}
bool
+linux_process_target::low_siginfo_fixup (siginfo_t *native, gdb_byte *inf,
+ int direction)
+{
+ return false;
+}
+
+bool
linux_process_target::supports_qxfer_siginfo ()
{
return true;