2 ms·
Debuggers also double as an instant profiler. "Hmm, this program is running slowly, I wonder why..." -> gdb -p $PID -> a few random Ctrl-C's and c's -> finding
by cozzyd 8y ago
Debuggers also double as an instant profiler. "Hmm, this program is running slowly, I wonder why..." -> gdb -p $PID -> a few random Ctrl-C's and c's -> finding the bottleneck and the state that led to it (which a real profiler won't usually tell you).
Also watches are invaluable when you know something is getting a wrong value but you don't know where.