Commit Graph

2 Commits

Author SHA1 Message Date
Jacques Lucke
2e412e683b Tools: improve gdb frame filter for lazy functions 2024-08-08 12:02:00 +02:00
Jacques Lucke
51f94d6234 Tools: add GDB debug extension
This adds a Python file that can be loaded into GDB to improve the debugging
experience. This is similar to cfb60c98be which
contains a subset of the features provided here. While not being compatible with
other debuggers, specializing on just GDB allows us to use the GDB Python API
which is quite feature rich. Besides adding quite a few pretty-printers, this
also adds some frame filters which simplify backtraces. I've been using the
pretty-printers for quite some time myself already.

I added a basic guide on how to set it up in `blender_gdb_extension.py` but that
only covers the case when using `gdb` directly. If this is accepted, I can add
some more detailed guides on how to configure e.g. vscode to the developer docs.

The patch also contains some type hints for GDB which I wrote, which simplify
working with the GDB API.

Pull Request: https://projects.blender.org/blender/blender/pulls/126062
2024-08-08 10:28:17 +02:00