3 ms·
GDB has the "skip" command to help with this but it has limitations. It stops you stepping into namespaces you don't want to see but doesn't do anything when y
by mark_undoio 4y ago
GDB has the "skip" command to help with this but it has limitations.
It stops you stepping into namespaces you don't want to see but doesn't do anything when you step out into them.
It also doesn't handle when code you don't want to see calls back into code you do - and, yes, I've recommended formatting lambdas to allow breakpoints before.
I believe DWARF does support columnar information these days so it actually should be possible to solve the one line lambda given code in GDB.
For looking at any data in C++ it's also very important to have GDB's pretty printers set up (and, likely, write some of your own).
https://sourceware.org/gdb/onlinedocs/gdb/Pretty_002dPrinter-Introduction.html https://sourceware.org/gdb/onlinedocs/gdb/Pretty_002dPrinter...
https://undo.io/resources/gdb-watchpoint/here-quick-way-pretty-print-structures-gdb/ https://undo.io/resources/gdb-watchpoint/here-quick-way-pret... (this one is from my boss)