forked from Imagelibrary/binutils-gdb
gdbserver/linux-low: turn '{collect, supply}_ptrace_register' into methods
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn the 'collect_ptrace_register' and 'supply_ptrace_register' linux target ops into methods of linux_process_target. * linux-low.h (struct linux_target_ops): Remove the ops. (class linux_process_target) <low_collect_ptrace_register> <low_store_ptrace_register>: Declare. * linux-low.cc (linux_process_target::low_collect_ptrace_register) (linux_process_target::low_supply_ptrace_register): Define. Update the callers below. (linux_process_target::fetch_register) (linux_process_target::store_register) * linux-x86-low.cc (the_low_target): Remove the op fields. * linux-aarch64-low.cc (the_low_target): Ditto. * linux-arm-low.cc (the_low_target): Ditto. * 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-sh-low.cc (the_low_target): Ditto. * linux-sparc-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. * linux-mips-low.cc (class mips_target) <low_collect_ptrace_register> <low_supply_ptrace_register>: Declare. (mips_collect_ptrace_register): Turn into ... (mips_target::low_collect_ptrace_register): ...this. (mips_supply_ptrace_register): Turn into... (mips_target::low_supply_ptrace_register): ...this. (the_low_target): Remove the op fields. * linux-ppc-low.cc (class ppc_target) <low_collect_ptrace_register> <low_supply_ptrace_register>: Declare. (ppc_collect_ptrace_register): Turn into ... (ppc_target::low_collect_ptrace_register): ...this. (ppc_supply_ptrace_register): Turn into ... (ppc_target::low_supply_ptrace_register): ...this. (ppc_fill_gregset): Update for the calls to low_collect_ptrace_register. (the_low_target): Remove the op fields. * linux-s390-low.cc (class s390_target) <low_collect_ptrace_register> <low_supply_ptrace_register>: Declare. (s390_collect_ptrace_register): Turn into ... (s390_target::low_collect_ptrace_register): ...this. (s390_supply_ptrace_register): Turn into ... (s390_target::low_supply_ptrace_register): ...this. (s390_fill_gregset): Update for the calls to low_collect_ptrace_register. (the_low_target): Remove the op fields.
This commit is contained in:
@@ -131,13 +131,6 @@ struct lwp_info;
|
||||
|
||||
struct linux_target_ops
|
||||
{
|
||||
/* Hooks to reformat register data for PEEKUSR/POKEUSR (in particular
|
||||
for registers smaller than an xfer unit). */
|
||||
void (*collect_ptrace_register) (struct regcache *regcache,
|
||||
int regno, char *buf);
|
||||
void (*supply_ptrace_register) (struct 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.
|
||||
@@ -682,6 +675,14 @@ protected:
|
||||
|
||||
virtual CORE_ADDR low_stopped_data_address ();
|
||||
|
||||
/* Hooks to reformat register data for PEEKUSR/POKEUSR (in particular
|
||||
for registers smaller than an xfer unit). */
|
||||
virtual void low_collect_ptrace_register (regcache *regcache, int regno,
|
||||
char *buf);
|
||||
|
||||
virtual void low_supply_ptrace_register (regcache *regcache, int regno,
|
||||
const char *buf);
|
||||
|
||||
/* How many bytes the PC should be decremented after a break. */
|
||||
virtual int low_decr_pc_after_break ();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user