forked from Imagelibrary/binutils-gdb
gdbserver/linux-low: turn 'get_syscall_trapinfo' into a method
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn the 'get_syscall_trapinfo' linux target op into a method of process_stratum_target. * linux-low.h (struct linux_target_ops): Remove the op. (class linux_process_target) <get_syscall_trapinfo> <gdb_catch_this_syscall> <low_supports_catch_syscall> <low_get_syscall_trapinfo>: Declare. * linux-low.cc (get_syscall_trapinfo): Turn into... (linux_process_target::get_syscall_trapinfo): ...this. (linux_process_target::low_get_syscall_trapinfo): Define. (gdb_catch_this_syscall_p): Turn into... (linux_process_target::gdb_catch_this_syscall): ...this. (linux_process_target::low_supports_catch_syscall): Define. Update the callers below. (linux_process_target::wait_1) (linux_process_target::supports_catch_syscall) * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall> <low_get_syscall_trapinfo>: Declare. (x86_target::low_supports_catch_syscall): Define. (x86_get_syscall_trapinfo): Turn into... (x86_target::low_get_syscall_trapinfo): ...this. (the_low_target): Remove the op field. * linux-aarch64-low.cc (class aarch64_target) <low_supports_catch_syscall> <low_get_syscall_trapinfo>: Declare. (aarch64_target::low_supports_catch_syscall): Define. (aarch64_get_syscall_trapinfo): Turn into... (aarch64_target::low_get_syscall_trapinfo): ...this. (the_low_target): Remove the op field. * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall> <low_get_syscall_trapinfo>: Declare. (arm_target::low_supports_catch_syscall): Define. (arm_get_syscall_trapinfo): Turn into... (arm_target::low_get_syscall_trapinfo): ...this. (the_low_target): Remove the op field. * linux-ppc-low.cc (the_low_target): Remove the op field. * linux-s390-low.cc (the_low_target): Remove the op field.
This commit is contained in:
@@ -176,6 +176,10 @@ protected:
|
||||
|
||||
bool low_supports_range_stepping () override;
|
||||
|
||||
bool low_supports_catch_syscall () override;
|
||||
|
||||
void low_get_syscall_trapinfo (regcache *regcache, int *sysno) override;
|
||||
|
||||
private:
|
||||
|
||||
/* Update all the target description of all processes; a new GDB
|
||||
@@ -1110,11 +1114,17 @@ x86_target::low_arch_setup ()
|
||||
current_process ()->tdesc = x86_linux_read_description ();
|
||||
}
|
||||
|
||||
bool
|
||||
x86_target::low_supports_catch_syscall ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Fill *SYSNO and *SYSRET with the syscall nr trapped and the syscall return
|
||||
code. This should only be called if LWP got a SYSCALL_SIGTRAP. */
|
||||
|
||||
static void
|
||||
x86_get_syscall_trapinfo (struct regcache *regcache, int *sysno)
|
||||
void
|
||||
x86_target::low_get_syscall_trapinfo (regcache *regcache, int *sysno)
|
||||
{
|
||||
int use_64bit = register_size (regcache->tdesc, 0) == 8;
|
||||
|
||||
@@ -2985,7 +2995,6 @@ x86_get_ipa_tdesc_idx (void)
|
||||
|
||||
struct linux_target_ops the_low_target =
|
||||
{
|
||||
x86_get_syscall_trapinfo,
|
||||
x86_get_ipa_tdesc_idx,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user