diff options
author | Matheus Branco Borella <dark.ryu.550@gmail.com> | 2023-05-18 00:33:57 -0300 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-07-04 12:07:16 +0100 |
commit | bb2bd584f31a25ba1cfe5bdac4d07d8cffe87c3d (patch) | |
tree | 8dac0966bc63e625f87af8e1a6a2243e15df3803 /opcodes | |
parent | b8c2de06bcbc13a1a6b93163cf675272d7eada9f (diff) | |
download | gdb-bb2bd584f31a25ba1cfe5bdac4d07d8cffe87c3d.zip gdb-bb2bd584f31a25ba1cfe5bdac4d07d8cffe87c3d.tar.gz gdb-bb2bd584f31a25ba1cfe5bdac4d07d8cffe87c3d.tar.bz2 |
gdb: add __repr__() implementation to a few Python types
Only a few types in the Python API currently have __repr__()
implementations. This patch adds a few more of them. specifically: it
adds __repr__() implementations to gdb.Symbol, gdb.Architecture,
gdb.Block, gdb.Breakpoint, gdb.BreakpointLocation, and gdb.Type.
This makes it easier to play around the GDB Python API in the Python
interpreter session invoked with the 'pi' command in GDB, giving more
easily accessible tipe information to users.
An example of how this would look like:
(gdb) pi
>> gdb.lookup_type("char")
<gdb.Type code=TYPE_CODE_INT name=char>
>> gdb.lookup_global_symbol("main")
<gdb.Symbol print_name=main>
The gdb.Block.__repr__() method shows the first 5 symbols from the
block, and then a message to show how many more were elided (if any).
Diffstat (limited to 'opcodes')
0 files changed, 0 insertions, 0 deletions