aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/linux-x86-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-x86-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-x86-low.cc')
-rw-r--r--gdbserver/linux-x86-low.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdbserver/linux-x86-low.cc b/gdbserver/linux-x86-low.cc
index d33833d..bf4e6ec 100644
--- a/gdbserver/linux-x86-low.cc
+++ b/gdbserver/linux-x86-low.cc
@@ -141,6 +141,10 @@ protected:
/* collect_ptrace_register/supply_ptrace_register are not needed in the
native i386 case (no registers smaller than an xfer unit), and are not
used in the biarch case (HAVE_LINUX_USRREGS is not defined). */
+
+ /* Need to fix up i386 siginfo if host is amd64. */
+ bool low_siginfo_fixup (siginfo_t *native, gdb_byte *inf,
+ int direction) override;
};
/* The singleton target ops object. */
@@ -757,8 +761,8 @@ x86_debug_reg_state (pid_t pid)
from INF to PTRACE. If DIRECTION is 0, copy from PTRACE to
INF. */
-static int
-x86_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
+bool
+x86_target::low_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
{
#ifdef __x86_64__
unsigned int machine;
@@ -775,7 +779,7 @@ x86_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
FIXUP_X32);
#endif
- return 0;
+ return false;
}
static int use_xml;
@@ -2926,8 +2930,6 @@ x86_get_ipa_tdesc_idx (void)
struct linux_target_ops the_low_target =
{
- /* need to fix up i386 siginfo if host is amd64 */
- x86_siginfo_fixup,
x86_linux_new_process,
x86_linux_delete_process,
x86_linux_new_thread,