gdb: don't require displaced step copy_insn to be implemented in prepare/finish are
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 7 Apr 2020 15:01:38 +0000 (11:01 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 4 Jun 2020 19:04:21 +0000 (15:04 -0400)
commit5514706f739978e0897d01ec9fa25fa61861c263
tree14c9b1f22a9e83d1579a983919ef6bedea1a3519
parent348a832d84a566eb9e8a8bed87c274f7b0e2579f
gdb: don't require displaced step copy_insn to be implemented in prepare/finish are

The gdbarch verification currently requires that the gdbarch
displaced_step_prepare and displaced_step_finish methods are provided if
displaced_step_copy_insn is (and not provided if it isn't).

displaced_step_copy_insn is used by the
multiple_displaced_buffer_manager class, but a gdbarch could very well
decide to implement prepare and finish without that, and without
requiring copy_insn.

Remove the dependency in the gdbarch verification between prepare/finish
and copy_insn.  Now, prepare and finish must be both provided or both
not-provided.

Since multiple_displaced_buffer_manager uses the `copy_insn` and `fixup`
gdbarch methods, it now asserts that they are present for the thread
architecture in its `prepare` method.
gdb/displaced-stepping.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/infrun.c
This page took 0.027286 seconds and 4 git commands to generate.