This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Executable's debug format


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]