Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: drow@false.org, mec.gnu@mindspring.com, zack@codesourcery.com
Cc: ezannoni@redhat.com, gdb@sources.redhat.com, jimb@redhat.com
Subject: Re: gcc HEAD, stabs+, TYPE_CODE_INT problem
Date: Mon, 05 Apr 2004 20:26:00 -0000	[thread overview]
Message-ID: <20040405202649.104DB4B104@berman.michael-chastain.com> (raw)

Daniel's on the money, as usual.

With these stabs:

    # gcc 3.3.3
    .stabs	"char:t(0,2)=r(0,2);0;127;",128,0,0,0
    .stabs	"__caddr_t:t(7,35)=(7,36)=*(0,2)",128,0,82,0
    .stabs	"s:G(7,36)",32,0,7,0

gdb prints "(7,36)" as "(0,2) *" and prints "(0,2)" as "char" because
"char" is the name of the type, for an end result of "char *".  I can
see this happening by stepping through gdb.  Also, if I hand-edit the
first stab and change "char:t(0,2)=r(0,2)" to "foo_char:t(0,2)=r(0,2)",
then the name of the type changes.

With these stabs:

    # gcc HEAD
    .stabs	"__caddr_t:t(3,44)=(3,45)=*(3,46)=r(3,46);0;127;",128,0,82,0
    .stabs	"s:G(3,45)",32,0,7,0

gdb prints "(3,45)" as "(3,46) *", but the type "(3,46)" has no name.

Zack, this happened with your c-decl rewrite.  I did the date-narrowing
process and isolated it to this patch.

gcc 3.3.3 (and gcc HEAD 20040323) emitted about 20 stab lines for the
list from first_builtin_decl to last_builtin_decl.  This provides gdb
with names for "char", "int", "float", et cetera.  gcc HEAD 20040330 no
longer uses provides this list so there are no more stab lines for the
builtin types.  Can we change gcc to bring these builtins back?

Either that, or we have to change gdb to recognize the unnamed ranges
and interpolate names for them, which gets icky real fast for a
cross-debugger.

Michael C


             reply	other threads:[~2004-04-05 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-05 20:26 Michael Elizabeth Chastain [this message]
2004-04-05 20:47 ` Zack Weinberg
  -- strict thread matches above, loose matches on Subject: below --
2004-04-05 21:36 Michael Elizabeth Chastain
2004-04-05 23:26 ` Zack Weinberg
2004-04-05 19:09 Michael Elizabeth Chastain
2004-04-05 19:32 ` Daniel Jacobowitz

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=20040405202649.104DB4B104@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=drow@false.org \
    --cc=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=zack@codesourcery.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