This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Executable's debug format
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Bob Rossi <bob at brasko dot net>
- Cc: gdb at sources dot redhat dot com
- Date: 12 Feb 2004 22:03:02 -0500
- Subject: Re: Executable's debug format
- References: <20040213005432.GA4476@white>
Bob Rossi <bob@brasko.net> writes:
> Is there a way to find out what debug format the debugging info in the
> executable is in?
Yes, but I don't know of a trivial way.
Run objdump -h to see the sections.
If the program has a .debug it is using DWARF 1.
If the program has a .debug_info it is using DWARF 2.
If the program has .stab and .stabstr sections it is using stabs
debugging information.
There are many other possibilities, though those are the most common
these days.
> Or is it more complicated? Can a single executable be composed of object
> files which each have there debugging info in a different format?
Yes, that is possible, though very unusual.
Ian