]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/python: allow instantiation of gdb.Symbol from Python
authorJan Vrany <jan.vrany@labware.com>
Thu, 21 Nov 2024 12:31:21 +0000 (12:31 +0000)
committerJan Vrany <jan.vrany@labware.com>
Thu, 21 Nov 2024 13:52:21 +0000 (13:52 +0000)
commit265779df9436a5f3293963635a6664395485b29d
tree20b40cdbab54b521677ad754d821555a65794826
parent3150cb09a4d66e71686899207907f5b491fc39e6
gdb/python: allow instantiation of gdb.Symbol from Python

This commit adds code to allow user extension to instantiate
gdb.Symbol.

As of now only "function" symbols can be created (that is: symbols
of FUNCTION_DOMAIN and with address class LOC_BLOCK). This is enough
to be able to implement "JIT reader" equivalent in Python. Future
commits may extend this API to allow creation of other kinds of symbols
(static variables, arguments, locals and so on).

Like previous similar commits, this is a step towards a Python support
for dynamically generated code (JIT) in GDB.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
gdb/doc/python.texi
gdb/objfiles.c
gdb/objfiles.h
gdb/python/py-symbol.c
gdb/testsuite/gdb.python/py-symbol.exp