aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTim Wiederhake <tim.wiederhake@intel.com>2017-05-02 11:35:54 +0200
committerTim Wiederhake <tim.wiederhake@intel.com>2017-05-02 11:35:54 +0200
commitd050f7d7f474c7e3ba26902a9cbb185910921a11 (patch)
tree68ee8305e83ce6d0cfcf17b91454d98693e01ecd /gdb/doc
parent14f819c8c5f7d080e5eea9256f0ec7453aac750e (diff)
downloadgdb-d050f7d7f474c7e3ba26902a9cbb185910921a11.zip
gdb-d050f7d7f474c7e3ba26902a9cbb185910921a11.tar.gz
gdb-d050f7d7f474c7e3ba26902a9cbb185910921a11.tar.bz2
Python: Introduce gdb.Instruction class
This adds a generic instruction class to Python and has gdb.RecordInstruction inherit from it.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/python.texi40
2 files changed, 26 insertions, 19 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index f916167..8afb2e5 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,10 @@
2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
+ * python.texi (Recording in Python): Factor out the documentation of
+ gdb.RecordInstruction's super class.
+
+2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
+
* python.texi (Recording in Python): Replace gdb.BtraceFunction with
gdb.RecordFunctionSegment. Rename prev_sibling and next_sibling to
prev and next.
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index da579fc..ee4f7a2 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3149,40 +3149,42 @@ A @code{gdb.Record} object has the following methods:
Move the replay position to the given @var{instruction}.
@end defun
-A @code{gdb.RecordInstruction} object has the following attributes:
+The common @code{gdb.Instruction} class that recording method specific
+instruction objects inherit from, has the following attributes:
-@defvar RecordInstruction.number
-An integer identifying this instruction. @var{number} corresponds to
-the numbers seen in @code{record instruction-history}
-(@pxref{Process Record and Replay}).
-@end defvar
-
-@defvar RecordInstruction.sal
-A @code{gdb.Symtab_and_line} object representing the associated symtab
-and line of this instruction. May be @code{None} if no debug information is
-available.
-@end defvar
-
-@defvar RecordInstruction.pc
+@defvar Instruction.pc
An integer representing this instruction's address.
@end defvar
-@defvar RecordInstruction.data
+@defvar Instruction.data
A buffer with the raw instruction data. In Python 3, the return value is a
@code{memoryview} object.
@end defvar
-@defvar RecordInstruction.decoded
+@defvar Instruction.decoded
A human readable string with the disassembled instruction.
@end defvar
-@defvar RecordInstruction.size
+@defvar Instruction.size
The size of the instruction in bytes.
@end defvar
+Additionally @code{gdb.RecordInstruction} has the following attributes:
+
+@defvar RecordInstruction.number
+An integer identifying this instruction. @code{number} corresponds to
+the numbers seen in @code{record instruction-history}
+(@pxref{Process Record and Replay}).
+@end defvar
+
+@defvar RecordInstruction.sal
+A @code{gdb.Symtab_and_line} object representing the associated symtab
+and line of this instruction. May be @code{None} if no debug information is
+available.
+@end defvar
+
@defvar RecordInstruction.is_speculative
-A boolean indicating whether the instruction was executed
-speculatively.
+A boolean indicating whether the instruction was executed speculatively.
@end defvar
If an error occured during recording or decoding a recording, this error is