I'm using gdb's next n command, and when I stop,
I usually write finish to know in which file I landed:
(gdb) finish
Run till exit from #0 klee::Executor::executeAlloc (this=0x5555577dfaf0, ...) at
/home/oren/GIT/klee/str.klee/klee/lib/Core/Executor.cpp:3218
Is there a more elegant way to know which file am I debugging right now?
I mean something like:
(gdb) next 100
3
3194 true);
(gdb) whereami
/home/oren/GIT/klee/str.klee/klee/lib/Core/Executor.cpp:3194
My current method makes me run everything twice ...
I think the backtrace command does what you want:
(gdb) backtrace 1
#0 0x00007ffff76ed441 in __pselect (nfds=1, readfds=0x7fffffffcc00,
writefds=0x0, exceptfds=0x0, timeout=<optimized out>,
sigmask=0x7fffffffcb80) at ../sysdeps/unix/sysv/linux/pselect.c:69
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With