This is the mail archive of the cygwin mailing list for the Cygwin 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: gdb, no line numbers after gcc -g ???


Hugh Sasse wrote:

> OK, it works for a hello world, it says the symbols are loaded.
> Therefore, as was most likely, I've munged something.  How do I
> interrogate object files to see which is/are missing the symbol data
> (if that's what would throw everything else off the scent)?

You can use "objdump -h file.o" and look at the sections.  If you see
.stab and .stabstr then you have STABS debug symbols (default for -g);
if you have .debug_{abbrev,info,line,frame,pubnames,aranges,str} then
you have Dwarf-2 debug symbols, which you get with -gdwarf-2 and are
generally more sophisticated and better supported by gdb.  If you see
neither of those sets of sections, you have no debug data.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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