This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Stabs or Dwarf Was: [PATCH]: testsuite/gdb.base/constvars.exp
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: Stabs or Dwarf Was: [PATCH]: testsuite/gdb.base/constvars.exp
- From: Stan Shebs <shebs at apple dot com>
- Date: Wed, 26 Sep 2001 14:38:08 -0700
- CC: Michael Snyder <msnyder at cygnus dot com>, Fernando Nasser <fnasser at redhat dot com>, gdb at sources dot redhat dot com, vinschen at redhat dot com
- References: <20010925192434.M29024@cygbert.vinschen.de> <3BB0C224.AB324D56@cygnus.com> <3BB0CB81.8385E123@redhat.com> <3BB0F122.3E45B3ED@cygnus.com> <3BB236BB.F50E045E@cygnus.com>
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