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]

Re: Stabs or Dwarf Was: [PATCH]: testsuite/gdb.base/constvars.exp


Fernando Nasser writes:
 > Hi Stan,
 > 
 > Thanks for your comments.
 > 
 > Stan Shebs wrote:
 > > 
 > > I can't think of a completely reliable test on binary files.  For
 > > instance, in original a.out, stabs are plain symbols, not in a
 > > distinctly-named section.  You also have the problem of an executable
 > > maybe having libraries compiled with stabs, and main prog with dwarf,
 > > and objdump can't distinguish.
 > > 
 > 
 > True.
 > 
 > I was thinking just in terms of the testsuite.  Most test programs are
 > a single file.  Could we test just the object file for that one?

I have seen cases in which we have both a .mdebug and a .stabs (or was
that dwarf2) sections (for the same program segment), and even gdb
itself gets confused as to which one is the reliable debug
info. Frankly I wouldn't be able to say exactly under which
circumstances you get this, but I have seen it.

I think this is basically what Stan is saying, the heuristic is
unreliable.

Elena


 > 
 > Another idea: if we can't say t is stabs but we can say it is dwarf,
 > we could implement a gdb_is_dwarf instead.  Would that help?
 > 
 > Regards,
 > Fernando
 > 
 > 
 > -- 
 > Fernando Nasser
 > Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
 > 2323 Yonge Street, Suite #300
 > Toronto, Ontario   M4P 2C9


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