aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-06-29 11:27:40 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-06-29 11:27:46 -0400
commit19b187a978c5229578ca20627c23eb2b3553f24b (patch)
tree6cedff92eafa97785f8ca9b14f37c51d6b09e9bf
parentdf5b8876083ec8c7bfb44ecb91b516c864edebfd (diff)
downloadfsf-binutils-gdb-19b187a978c5229578ca20627c23eb2b3553f24b.zip
fsf-binutils-gdb-19b187a978c5229578ca20627c23eb2b3553f24b.tar.gz
fsf-binutils-gdb-19b187a978c5229578ca20627c23eb2b3553f24b.tar.bz2
gdb: fix documentation of gdbarch_displaced_step_copy_insn
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
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbarch.h4
-rwxr-xr-xgdb/gdbarch.sh4
3 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a34c2ea..fb1912c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index d7e7c49..4e51c29 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -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.
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index f1a07b8..ad27a4e 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -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.