The ELF object file format (which is what gcc generates on many common platforms) is a container format which can contain lots of different types of information. It always contains a symbol table of externally linked symbols (either defined or needed from a library). In addition, if -g
was specified, the ELF file will contain lots of information only used by the debugger, including all the local symbols used.
You can use objdump --debugging
or readelf --debug-dump
to look at the debugging information in a somewhat human-readable format. Good luck!
One thing generally not contained in the debugging information is the actual source code. What you'll find is the name of the source file and line numbers corresponding to different blocks of compiled code. The debugger reads the source code file to report source lines; that will not work as expected if the source code file has been edited since the executable was compiled.