]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add Inferior.architecture method
authorTom Tromey <tom@tromey.com>
Sun, 7 Oct 2018 04:57:19 +0000 (22:57 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 7 Oct 2018 05:20:55 +0000 (23:20 -0600)
commitadd5ded5e476918ef8b05823801531de2f51fa9c
tree09e555d434e9332abcc7846958610f0bd5f50c99
parent51e78fc5fa21870d415c52f90b93e3c6ad57be46
Add Inferior.architecture method

I've written a couple of gdb unwinders in Python, and while doing so,
I wanted to find the architecture of the inferior.  (In an unwinder in
particular, one can't use the frame's architecture, because there is
no frame.)

This patch adds Inferior.architecture to allow this.  Normally I think
I would have chosen an attribute and not a method here, but seeing
that Frame.architecture is a method, I chose a method as well, for
consistency.

gdb/ChangeLog
2018-10-06  Tom Tromey  <tom@tromey.com>

PR python/19399:
* python/py-inferior.c: Add "architecture" entry.
(infpy_architecture): New function.

gdb/doc/ChangeLog
2018-10-06  Tom Tromey  <tom@tromey.com>

PR python/19399:
* python.texi (Inferiors In Python): Document
Inferior.Architecture.

gdb/testsuite/ChangeLog
2018-10-06  Tom Tromey  <tom@tromey.com>

PR python/19399:
* gdb.python/py-inferior.exp: Add architecture test.
gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-inferior.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-inferior.exp