From 87dbc77459930f8f65a6d7d1e1db498da4aa74d6 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Sun, 7 Jun 2020 23:07:52 +0100 Subject: 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/NEWS | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/NEWS') diff --git a/gdb/NEWS b/gdb/NEWS index a116d62..29db073 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -117,6 +117,9 @@ GNU/Linux/RISC-V (gdbserver) riscv*-*-linux* ** Commands written in Python can be in the "TUI" help class by registering with the new constant gdb.COMMAND_TUI. + ** New method gdb.PendingFrame.architecture () to retrieve the + architecture of the pending frame. + *** Changes in GDB 9 * 'thread-exited' event is now available in the annotations interface. -- cgit v1.1