[PATCH] libstdc++:: improve how pretty printers find node types (PR 91997)

Jonathan Wakely jwakely@redhat.com
Tue Dec 3 09:52:00 GMT 2019


On 03/12/19 06:58 +0100, François Dumont wrote:
>On 11/29/19 3:46 PM, Jonathan Wakely wrote:
>>This fixes two related problems.
>>
>>The iterators for node-based containers use nested typedefs such as
>>std::list<T>::iterator::_Node to denote their node types. As reported in
>>https://bugzilla.redhat.com/show_bug.cgi?id=1053438 those typedefs are
>>not always present in the debug info. That means the pretty printers
>>cannot find them using gdb.lookup_type (via the find_type helper).
>>Instead of looking up the nested typedefs this patch makes the printers
>>look up the actual class templates directly.
>>
>>A related problem (and the original topic of PR 91997) is that GDB fails
>>to find types via gdb.lookup_type when printing a backtrace from a
>>non-C++ functiion: https://sourceware.org/bugzilla/show_bug.cgi?id=25234
>>That is also solved by not looking up the nested typedef.
>>
>>    PR libstdc++/91997
>>    * python/libstdcxx/v6/printers.py (find_type): Fail more gracefully
>>    if we run out of base classes to look at.
>>    (llokup_templ_spec, lookup_node_type): New utilities to find node
>
>Small typo here for the 'lookup'.

Fixed, thanks.



More information about the Libstdc++ mailing list