mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-27 01:00:26 +08:00
dfe844c200
* fix: Union subprinters with `None` See https://github.com/bminor/binutils-gdb/blob/a4418a9c6f99fd31c51698b1f6a6f8dbc1b81b6f/gdb/python/lib/gdb/printing.py#L52-L55 * fix: Allow callables as argument to `printer` See https://github.com/bminor/binutils-gdb/blob/a4418a9c6f99fd31c51698b1f6a6f8dbc1b81b6f/gdb/python/lib/gdb/printing.py#L77 and the description of "function / old way" in the body of `register_pretty_printer`. The new union's signature is equivalent to `gdb.printing.PrettyPrinter(...).__call__`. * fix: make `gdb.Block` iterable over `gdb.Symbol` See https://sourceware.org/gdb/onlinedocs/gdb/Blocks-In-Python.html#Blocks-In-Python: > A gdb.Block is iterable. The iterator returns the symbols (see [Symbols In Python](https://sourceware.org/gdb/onlinedocs/gdb/Symbols-In-Python.html#Symbols-In-Python)) local to the block. Implementation of `gdb.BlockIterator` is given in https://github.com/bminor/binutils-gdb/blob/gdb-12-branch/gdb/python/py-block.c. As with many of the other classes, `BlockIterator` is actually imported from the built-in `_gdb` module (https://github.com/bminor/binutils-gdb/blob/a4418a9c6f99fd31c51698b1f6a6f8dbc1b81b6f/gdb/python/lib/gdb/__init__.py#L28). Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>