aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-03-14 11:43:14 +0000
committerAndrew Burgess <aburgess@redhat.com>2023-04-06 15:01:43 +0100
commit56fcb715a9f6abddd51f981e15a14d88ae766fc5 (patch)
tree30dce3b3c70c1b6f88a54e450ab92cfdb50657a6 /gdb/doc
parentd2d62da62ec9c5486b19d8ffc7b4ef4070e8df7a (diff)
downloadgdb-56fcb715a9f6abddd51f981e15a14d88ae766fc5.zip
gdb-56fcb715a9f6abddd51f981e15a14d88ae766fc5.tar.gz
gdb-56fcb715a9f6abddd51f981e15a14d88ae766fc5.tar.bz2
gdb/python: have PendingFrame methods accept keyword arguments
Update the two gdb.PendingFrame methods gdb.PendingFrame.read_register and gdb.PendingFrame.create_unwind_info to accept keyword arguments. There's no huge benefit for making this change, both of these methods only take a single argument, so it is (maybe) less likely that a user will take advantage of the keyword arguments in these cases, but I think it's nice to be consistent, and I don't see any particular draw backs to making this change. For PendingFrame.read_register I've changed the argument name from 'reg' to 'register' in the documentation and used 'register' as the argument name in GDB. My preference for APIs is to use full words where possible, and given we didn't support named arguments before this change should not break any existing code. There should be no user visible changes (for existing code) after this commit. Reviewed-By: Eli Zaretskii <eliz@gnu.org> Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/python.texi8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index a4fd009..1315ddc 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -2756,11 +2756,11 @@ unwinding.
An object passed to an unwinder (a @code{gdb.PendingFrame} instance)
provides a method to read frame's registers:
-@defun PendingFrame.read_register (reg)
-This method returns the contents of the register @var{reg} in the
+@defun PendingFrame.read_register (register)
+This method returns the contents of @var{register} in the
frame as a @code{gdb.Value} object. For a description of the
-acceptable values of @var{reg} see
-@ref{gdbpy_frame_read_register,,Frame.read_register}. If @var{reg}
+acceptable values of @var{register} see
+@ref{gdbpy_frame_read_register,,Frame.read_register}. If @var{register}
does not name a register for the current architecture, this method
will throw an exception.