diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:31 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:31 +0200 |
commit | 9eedd27d42ceeb6f3765c24972a5c97ce20727cd (patch) | |
tree | 5a404f9e0dc938bd6a5cf6563bd385606afa48f6 /gdbserver/linux-low.h | |
parent | b31cdfa69f4adfc4760da1480c900f5c27421d43 (diff) | |
download | gdb-9eedd27d42ceeb6f3765c24972a5c97ce20727cd.zip gdb-9eedd27d42ceeb6f3765c24972a5c97ce20727cd.tar.gz gdb-9eedd27d42ceeb6f3765c24972a5c97ce20727cd.tar.bz2 |
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.
Diffstat (limited to 'gdbserver/linux-low.h')
-rw-r--r-- | gdbserver/linux-low.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index 0182be1..1f1c382 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -131,10 +131,6 @@ struct lwp_info; struct linux_target_ops { - /* Fill *SYSNO with the syscall nr trapped. Only to be called when - inferior is stopped due to SYSCALL_SIGTRAP. */ - void (*get_syscall_trapinfo) (struct regcache *regcache, int *sysno); - /* See target.h. */ int (*get_ipa_tdesc_idx) (void); }; @@ -591,6 +587,14 @@ private: /* Back to private. */ fast_tpoint_collect_result linux_fast_tracepoint_collecting (lwp_info *lwp, fast_tpoint_collect_status *status); + /* This function should only be called if LWP got a SYSCALL_SIGTRAP. + Fill *SYSNO with the syscall nr trapped. */ + void get_syscall_trapinfo (lwp_info *lwp, int *sysno); + + /* Returns true if GDB is interested in the event_child syscall. + Only to be called when stopped reason is SYSCALL_SIGTRAP. */ + bool gdb_catch_this_syscall (lwp_info *event_child); + protected: /* The architecture-specific "low" methods are listed below. */ @@ -684,6 +688,14 @@ protected: /* Returns true if the low target supports range stepping. */ virtual bool low_supports_range_stepping (); + /* Return true if the target supports catch syscall. Such targets + override the low_get_syscall_trapinfo method below. */ + virtual bool low_supports_catch_syscall (); + + /* Fill *SYSNO with the syscall nr trapped. Only to be called when + inferior is stopped due to SYSCALL_SIGTRAP. */ + virtual void low_get_syscall_trapinfo (regcache *regcache, int *sysno); + /* How many bytes the PC should be decremented after a break. */ virtual int low_decr_pc_after_break (); }; |