gdb/python: Add architecture method to gdb.PendingFrame
authorAndrew Burgess <andrew.burgess@embecosm.com>
Sun, 7 Jun 2020 22:07:52 +0000 (23:07 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 6 Jul 2020 14:06:05 +0000 (15:06 +0100)
commit87dbc77459930f8f65a6d7d1e1db498da4aa74d6
treedf54e9f4653014f2558bdecaad050f1b0da24dc1
parent3bc98c0c832f5bdca364e083f92be687dbf494cc
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.
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-unwind.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-unwind.py
This page took 0.026029 seconds and 4 git commands to generate.