4 ms·
Debugger vs printf: Has anyone found a reliable way to use a debugger when you have a) multi-process b) multi-threaded c) async d) timeouts? I would love to us
by alfiedotwtf 2y ago
Debugger vs printf:
Has anyone found a reliable way to use a debugger when you have a) multi-process b) multi-threaded c) async d) timeouts? I would love to use a debugger but printf and logs “just work”
- fisf 2y agoGDB can do a, b, c (async Code is not really special?). d is going to be tricky and really depends.
- slashdave 2y agoThe syntax is clunky, but watchpoints can do what you want. https://ftp.gnu.org/old-gnu/Manuals/gdb/html_mono/gdb.html#SEC30 https://ftp.gnu.org/old-gnu/Manuals/gdb/html_mono/gdb.html#S...
- Mr-Frog 2y agoI used GDB to debug contributions to the ION Delay-Tolerant-Networking stack, which is composed of dozens of processes. After some practice it became super easy to attach GDB instances to several running processes and watch the C structs be passed between them.
- alfiedotwtf 2y agoThanks to all the replies… ok, looks like I’m going to have another go at debugging!