必须开启debug模式 -g
readelf --string-dump=.debug_str YOUR_PROGRAM | sed -n '//|.c/{s/.*] //p}'
readelf --syms YOUR-PROGGRAM |tee /tmp/log
vim /tmp/log
:vim "FILE" %
#You will get all file names, however without path.
readelf --syms YOUR-PROGGRAM | awk '/FILE/{name = $NF; print name}'
readelf -wi YOUR-PROGGRAM | grep -B1 DW_AT_comp_dir | awk '/DW_AT_name/{name = $NF; getline; print $NF"/"name}'