diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-07 23:07:52 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-07-06 15:06:05 +0100 |
commit | 87dbc77459930f8f65a6d7d1e1db498da4aa74d6 (patch) | |
tree | df54e9f4653014f2558bdecaad050f1b0da24dc1 /gdb/doc | |
parent | 3bc98c0c832f5bdca364e083f92be687dbf494cc (diff) | |
download | gdb-87dbc77459930f8f65a6d7d1e1db498da4aa74d6.zip gdb-87dbc77459930f8f65a6d7d1e1db498da4aa74d6.tar.gz gdb-87dbc77459930f8f65a6d7d1e1db498da4aa74d6.tar.bz2 |
gdb/python: Add architecture method to gdb.PendingFrame
It could be useful to determine the architecture of a frame being
unwound during the frame unwind process, that is, before we have a
gdb.Frame, but when we only have a gdb.PendingFrame.
The PendingFrame already has a pointer to the gdbarch internally, this
commit just exposes an 'architecture' method to Python, and has this
return a gdb.Architecture object (list gdb.Frame.architecture does).
gdb/ChangeLog:
* NEWS: Mention new Python API method.
* python/py-unwind.c (pending_framepy_architecture): New function.
(pending_frame_object_methods): Add architecture method.
gdb/testsuite/ChangeLog:
* gdb.python/py-unwind.py (TestUnwinder::__call__): Add test for
gdb.PendingFrame.architecture method.
gdb/doc/ChangeLog:
* python.texi (Unwinding Frames in Python): Document
PendingFrame.architecture method.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/python.texi | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index c591934..82ed257 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com> + + * python.texi (Unwinding Frames in Python): Document + PendingFrame.architecture method. + 2020-06-26 Eli Zaretskii <eliz@gnu.org> * gdb.texinfo (Shell Commands): More accurate description of use diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index a38f1da..fff7e5b 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -2518,6 +2518,12 @@ Each attribute value should be an instance of @code{gdb.Value}. @end defun +@defun PendingFrame.architecture () +Return the @code{gdb.Architecture} (@pxref{Architectures In Python}) +for this @code{gdb.PendingFrame}. This represents the architecture of +the particular frame being unwound. +@end defun + @subheading Unwinder Output: UnwindInfo Use @code{PendingFrame.create_unwind_info} method described above to |