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: Elena Zannoni <ezannoni at cygnus dot com>
- Subject: Re: Stabs or Dwarf Was: [PATCH]: testsuite/gdb.base/constvars.exp
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Thu, 27 Sep 2001 08:40:17 -0400
- CC: Stan Shebs <shebs at apple dot com>, Fernando Nasser <fnasser at cygnus dot com>, Michael Snyder <msnyder at cygnus dot com>, gdb at sources dot redhat dot com, vinschen at redhat dot com
- Organization: Red Hat Canada
- References: <20010925192434.M29024@cygbert.vinschen.de> <3BB0C224.AB324D56@cygnus.com> <3BB0CB81.8385E123@redhat.com> <3BB0F122.3E45B3ED@cygnus.com> <3BB236BB.F50E045E@cygnus.com> <3BB24ABF.1072EE55@apple.com> <3BB24F75.A33E707E@redhat.com> <15282.22221.826751.449834@krustylu.cygnus.com>
Elena Zannoni wrote:
>
> 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.
>
When you mean that gdb itself gets confused what is the end result of
that?
Does it pick one at the end (after a warning or something)?
Another question: does it happen even with the simple testsuite
programs?
If it is that unreliable, we could make sure the tests run with dwarf
only
when we are sure it is there and skip when we are not sure (if we can
determine that we are not sure from some gdb warning message).
P.S.: We can also be more aggressive and try and see where gdb gets
confused
and thinks it is dwarf (and so fail the tests). We could dig for the
reason
that happens. Just a thought.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9