Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@cygnus.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: Elena Zannoni <ezannoni@cygnus.com>, Stan Shebs <shebs@apple.com>,
	Fernando Nasser <fnasser@cygnus.com>,
	Michael Snyder <msnyder@cygnus.com>,
	gdb@sources.redhat.com, vinschen@redhat.com
Subject: Re: Stabs or Dwarf Was: [PATCH]: testsuite/gdb.base/constvars.exp
Date: Thu, 27 Sep 2001 08:24:00 -0000	[thread overview]
Message-ID: <15283.17918.885559.144596@krustylu.cygnus.com> (raw)
In-Reply-To: <3BB31E31.EECD98EC@redhat.com>

Fernando Nasser writes:
 > 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)?

No warning. For instance I have seen it pick the mdebug info which is
incomplete/incorrect. I have looked back at some old mail, and it was
with mdebug and dwarf2. I'll see if I can figure out what was
happening.

 > 
 > Another question: does it happen even with the simple testsuite
 > programs?
 > 

Don't know. I would think so. If the compiler emits 2 types of debug
info, it, in theory, should behave the same with any program.

 > 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).
 > 

It would be probably reliable 'in general'. Probably not that many
platforms emit both mdebug & dwarf2.

 > 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. 
 > 
 > 

Yep.

Elena

 > -- 
 > Fernando Nasser
 > Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
 > 2323 Yonge Street, Suite #300
 > Toronto, Ontario   M4P 2C9


  reply	other threads:[~2001-09-27  8:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010925192434.M29024@cygbert.vinschen.de>
     [not found] ` <3BB0C224.AB324D56@cygnus.com>
     [not found]   ` <3BB0CB81.8385E123@redhat.com>
     [not found]     ` <3BB0F122.3E45B3ED@cygnus.com>
2001-09-26 13:16       ` Fernando Nasser
2001-09-26 14:39         ` Stan Shebs
2001-09-26 15:02           ` Fernando Nasser
2001-09-26 15:22             ` Elena Zannoni
2001-09-27  5:44               ` Fernando Nasser
2001-09-27  8:24                 ` Elena Zannoni [this message]
2001-09-26 15:23             ` Michael Snyder
2001-09-27  5:39               ` Fernando Nasser
2001-09-27 12:58                 ` Fernando Nasser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15283.17918.885559.144596@krustylu.cygnus.com \
    --to=ezannoni@cygnus.com \
    --cc=fnasser@cygnus.com \
    --cc=fnasser@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=msnyder@cygnus.com \
    --cc=shebs@apple.com \
    --cc=vinschen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox