Does gcc having feature which can list of source files (.c/.c++/.h) from binary (if binary is having debug information)..??
I know same be can be achieved through objdump and GDB too. But "objdump" and "GDB" give the list of only ".c" file.
For Exapmle: I have two file (test.c and test.h) and i have compiled test code with "-g" option and used "objdump" as below:
bdk4user@llvm:~/home$ objdump --dwarf=decodedline a.out
a.out: file format elf64-x86-64
Decoded dump of debug contents of section .debug_line:
CU: test.c:
File name Line number Starting address
test.c 4 0x40057d
test.c 6 0x400585
test.c 7 0x40058f
test.c 8 0x4005a1
...
But it doesn't list the ".h" file which is also used.
So my question is, does GCC having any feature which can give list of all file which are being used in binary.??
OR any other utility to achieved the same..??
Thanks in advance.
#in the output. Any other place in the toolchain is too late.