Small clean up of use_displaced_stepping
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 2 Mar 2020 20:47:04 +0000 (15:47 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 10 Jun 2020 21:25:49 +0000 (17:25 -0400)
commit80e899b3608e074adef60f733d02c769b02d7aed
treeb39d7129c77a60dd5d5218ca62f957f2c4fcefc1
parent1c4d74506a3fb304be131740363969aa4ed4575e
Small clean up of use_displaced_stepping

This function returns the result of a quite big condition.  I think it
would be more readeable if it was broken up in smaller pieces and
commented.  This is what this patch does.

I also introduced gdbarch_supports_displaced_stepping, since it shows
the intent better than checking for gdbarch_displaced_step_copy_insn_p.
I also used that new function in displaced_step_prepare_throw.

I also updated the comment on top of can_use_displaced_stepping, which
seemed a bit outdated with respect to non-stop.  The comment likely
dates from before it was possible to have targets that always operate
non-stop under the hood, even when the user-visible mode is all-stop.

No functional changes intended.

gdb/ChangeLog:

* infrun.c (gdbarch_supports_displaced_stepping): New.
(use_displaced_stepping): Break up conditions in smaller pieces.
Use gdbarch_supports_displaced_stepping.
(displaced_step_prepare_throw): Use
gdbarch_supports_displaced_stepping.
gdb/ChangeLog
gdb/infrun.c
This page took 0.024451 seconds and 4 git commands to generate.