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 | b31cdfa69f4adfc4760da1480c900f5c27421d43 (patch) | |
tree | 6a17ecd2fa2566f8d3ef2b9b55916d41c7def9c4 /gdbserver/linux-low.h | |
parent | 9cfd87155142f0467cdadb067efd21e165956c20 (diff) | |
download | gdb-b31cdfa69f4adfc4760da1480c900f5c27421d43.zip gdb-b31cdfa69f4adfc4760da1480c900f5c27421d43.tar.gz gdb-b31cdfa69f4adfc4760da1480c900f5c27421d43.tar.bz2 |
gdbserver/linux-low: turn 'supports_hardware_single_step' into a method
All the linux low targets except arm define the
'supports_hardware_single_step' op to return true. Hence, we override
the method to return true in linux_process_target, and remove the
definitions in all the linux low targets but arm.
gdbserver/ChangeLog:
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Remove the 'supports_hardware_single_step' linux target op and
override the process_stratum_target's op definition in
linux_process_target to return true.
* linux-low.h (struct linux_target_ops): Remove the op.
(class linux_process_target) <finish_step_over>
<maybe_hw_step>: Declare.
* linux-low.cc (can_hardware_single_step): Remove.
(maybe_hw_step): Turn into...
(linux_process_target::maybe_hw_step): ...this.
(finish_step_over): Turn into...
(linux_process_target::finish_step_over): ...this.
(linux_process_target::supports_hardware_single_step): Update
to return true.
Update the callers below.
(linux_process_target::single_step)
(linux_process_target::resume_one_lwp_throw)
* linux-arm-low.cc (class arm_target)
<supports_hardware_single_step>: Declare.
(arm_supports_hardware_single_step): Turn into...
(arm_target::supports_hardware_single_step): ...this.
(the_low_target): Remove the op field.
* linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
Remove.
(the_low_target): Remove the op field.
* linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
(the_low_target): Remove the op field.
* linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
Remove.
(the_low_target): Remove the op field.
Diffstat (limited to 'gdbserver/linux-low.h')
-rw-r--r-- | gdbserver/linux-low.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index 86a563a..0182be1 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -131,9 +131,6 @@ struct lwp_info; struct linux_target_ops { - /* See target.h. */ - int (*supports_hardware_single_step) (void); - /* 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); @@ -401,6 +398,12 @@ private: events. */ void complete_ongoing_step_over (); + /* Finish a step-over. Reinsert the breakpoint we had uninserted in + start_step_over, if still there, and delete any single-step + breakpoints we've set, on non hardware single-step targets. + Return true if step over finished. */ + bool finish_step_over (lwp_info *lwp); + /* When we finish a step-over, set threads running again. If there's another thread that may need a step-over, now's the time to start it. Eventually, we'll move all threads past their breakpoints. */ @@ -519,6 +522,9 @@ private: or can't single step. */ int single_step (lwp_info* lwp); + /* Return true if THREAD is doing hardware single step. */ + bool maybe_hw_step (thread_info *thread); + /* Install breakpoints for software single stepping. */ void install_software_single_step_breakpoints (lwp_info *lwp); |