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 wrote:
> 
> >From a discussion in gdb-patches
> 
> Michael Snyder wrote:
> >
> > (...) we need some kind of test that applies
> > the xfails for stabs and not for dwarf.
> >
> 
> There are so many instances where this would be useful that I would
> like to suggest a "gdb_debug_format" procedure to be added to gdb.exp
> that would determine that.

Seems like a good idea to me too.

> We could use a binutils utility on the test file (which we know) and
> parse the output.  Does that seem reasonable?  Any other suggestions?

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.

On the other, grepping an assembly file produced via -S seems
reliable, since stabs always have at least one ".stabs" line,
and dwarf-2 will always have a .debug_info section mentioned, etc.
All of the compilers that GDB works with have a -S option.

Stan


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