diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:28 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:28 +0200 |
commit | cb63de7ca804e4178a48dc500423bcb89726d893 (patch) | |
tree | 5bddea0fd2ff0ca90cb0ab0a39c36b4fbb82eb27 /gdbserver/linux-low.h | |
parent | b35db73327cf54445a20533305fcf705e88a520b (diff) | |
download | gdb-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.h')
-rw-r--r-- | gdbserver/linux-low.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index ca6cf3e..599aead 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -131,12 +131,6 @@ struct lwp_info; struct linux_target_ops { - /* Hook to convert from target format to ptrace format and back. - Returns true if any conversion was done; false otherwise. - If DIRECTION is 1, then copy from INF to NATIVE. - If DIRECTION is 0, copy from NATIVE to INF. */ - int (*siginfo_fixup) (siginfo_t *native, gdb_byte *inf, int direction); - /* Hook to call when a new process is created or attached to. If extra per-process architecture-specific data is needed, allocate it here. */ @@ -628,6 +622,11 @@ private: registers meanwhile, we have the cached data we can rely on. */ bool check_stopped_by_watchpoint (lwp_info *child); + /* Convert a native/host siginfo object, into/from the siginfo in the + layout of the inferiors' architecture. */ + void siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, + int direction); + protected: /* The architecture-specific "low" methods are listed below. */ @@ -683,6 +682,13 @@ protected: virtual void low_supply_ptrace_register (regcache *regcache, int regno, const char *buf); + /* Hook to convert from target format to ptrace format and back. + Returns true if any conversion was done; false otherwise. + If DIRECTION is 1, then copy from INF to NATIVE. + If DIRECTION is 0, copy from NATIVE to INF. */ + virtual bool low_siginfo_fixup (siginfo_t *native, gdb_byte *inf, + int direction); + /* How many bytes the PC should be decremented after a break. */ virtual int low_decr_pc_after_break (); }; |