]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/python: add gdb.Compunit
authorJan Vrany <jan.vrany@labware.com>
Thu, 21 Nov 2024 12:31:20 +0000 (12:31 +0000)
committerJan Vrany <jan.vrany@labware.com>
Thu, 21 Nov 2024 13:49:11 +0000 (13:49 +0000)
commit840a8c0eee3cc5c3f206bddfabd979ed65577d5a
tree5c47d2d76f56cd6252ac5a4424609bebb2f103d1
parent42373e586463c77f241192f8c8da1a5bf7f9963a
gdb/python: add gdb.Compunit

This commit introduces gdb.Compunit - a representation of struct
compunit_symtab in Python.

It also adds method gdb.Objfile.compunits() to get a list of compunits
for an objfile and adds compunit attribute to gdb.Block and gdb.Symtab
to access compunit containing given block or symbol table.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
gdb/Makefile.in
gdb/NEWS
gdb/doc/python.texi
gdb/python/py-block.c
gdb/python/py-compunit.c [new file with mode: 0644]
gdb/python/py-objfile.c
gdb/python/py-symtab.c
gdb/python/python-internal.h
gdb/testsuite/gdb.python/py-block.exp
gdb/testsuite/gdb.python/py-compunit.exp [new file with mode: 0644]
gdb/testsuite/gdb.python/py-symtab.exp