gdb: fix documentation of gdbarch_displaced_step_copy_insn
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Jun 2020 15:27:40 +0000 (11:27 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Jun 2020 15:27:46 +0000 (11:27 -0400)
I spotted something that looks wrong in the doc of
gdbarch_displaced_step_copy_insn.

It says that if the function returns NULL, it means that it has emulated
the behavior of the instruction and written the result to REGS.
However, it says below that the function may return NULL to indicate
that the instruction can't be single-stepped out-of-line, in which case
the core steps the instruction in-line.  The two are contradictory.

The right one is the latter, if the function returns NULL, the core
falls back to in-line stepping. I checked all the implementations of
this function and they all agree with this.

gdb/ChangeLog:

* gdbarch.sh (displaced_step_copy_insn): Update doc.
* gdbarch.h: Re-generate.

Change-Id: I98163cdd38970cde4c77680e249b10f5d2d5bf9b

gdb/ChangeLog
gdb/gdbarch.h
gdb/gdbarch.sh

index a34c2ea972f1e1fcbff024b9a19ef52ed7f95787..fb1912c2d91973a6fa7567951daffe7452815a5d 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-29  Simon Marchi  <simon.marchi@efficios.com>
+
+       * gdbarch.sh (displaced_step_copy_insn): Update doc.
+       * gdbarch.h: Re-generate.
+
 2020-06-28  Tom Tromey  <tom@tromey.com>
 
        * command.h (cmd_types): Remove.
index d7e7c498d9e12c30474b02b1f9421c6bf4877eb9..4e51c295b36df745c9a853cb4a44c614732895cd 100644 (file)
@@ -1007,9 +1007,7 @@ extern void set_gdbarch_max_insn_length (struct gdbarch *gdbarch, ULONGEST max_i
    not the copy at TO.  The caller should update it to point at TO later.
   
    Return a pointer to data of the architecture's choice to be passed
-   to gdbarch_displaced_step_fixup.  Or, return NULL to indicate that
-   the instruction's effects have been completely simulated, with the
-   resulting state written back to REGS.
+   to gdbarch_displaced_step_fixup.
   
    For a general explanation of displaced stepping and how GDB uses it,
    see the comments in infrun.c.
index f1a07b8a2f4fc2196fac1065c2df41e1a85a43a9..ad27a4eca05e9a7fee5479e14537c5b0191ce0cd 100755 (executable)
@@ -767,9 +767,7 @@ V;ULONGEST;max_insn_length;;;0;0
 # not the copy at TO.  The caller should update it to point at TO later.
 #
 # Return a pointer to data of the architecture's choice to be passed
-# to gdbarch_displaced_step_fixup.  Or, return NULL to indicate that
-# the instruction's effects have been completely simulated, with the
-# resulting state written back to REGS.
+# to gdbarch_displaced_step_fixup.
 #
 # For a general explanation of displaced stepping and how GDB uses it,
 # see the comments in infrun.c.
This page took 0.029681 seconds and 4 git commands to generate.