我正在使用gdb的next n
命令,当我停止时,
我经常写finish
来了解我登陆的文件:
(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
是否有更优雅的方式来了解我现在正在调试哪个文件?
我的意思是:
(gdb) next 100
3
3194 true);
(gdb) whereami
/home/oren/GIT/klee/str.klee/klee/lib/Core/Executor.cpp:3194
我现在的方法让我跑两次......
答案 0 :(得分:2)
我认为backtrace
command符合您的要求:
(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