如何在GDB中查看文件的完整路径?

aaa*_*aaa 19 debugging gdb

当我停在gdb的断点时,它只显示filename.cpp.如何查看此文件的完整路径名?

小智 24

使用该info source命令获取当前堆栈帧的信息.

以下是其输出的示例:

(gdb) info source
Current source file is /build/gtk+2.0-LJ3oCC/gtk+2.0-2.24.30/modules/input/gtkimcontextxim.c
Located in /home/sashoalm/Desktop/compile/gtk+2.0-2.24.30/modules/input/gtkimcontextxim.c
Contains 1870 lines.
Source language is c.
Producer is GNU C11 5.3.1 20160225 -mtune=generic -march=i686 -g -g -O2 -O2 -fstack-protector-strong -fPIC -fstack-protector-strong.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.