2 ms·
gdb has a batch processing mode and its own scripting language with conditionals, loops, etc., so you could do this entirely with gdb scripting, probably. I've
by geofft 7y ago
gdb has a batch processing mode and its own scripting language with conditionals, loops, etc., so you could do this entirely with gdb scripting, probably. I've had good luck using gdb scripting for various things, notably conditional-ish breakpoints that printed some debugging info only under certain complicated conditions. (I do concede that if you know expect and not gdb scripting, except is quite likely easier, and it's possible expect is still easier if you know both, depending on the problem.)
- sigjuice 7y agogdb can also be scripted using Python. https://sourceware.org/gdb/onlinedocs/gdb/Python.html https://sourceware.org/gdb/onlinedocs/gdb/Python.html Edit: and Guile