From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Fix bug report 11479
Date: Thu, 22 Apr 2010 01:11:00 -0000 [thread overview]
Message-ID: <20100422011119.GF19194@adacore.com> (raw)
In-Reply-To: <001501cae197$280ca8b0$7825fa10$@muller@ics-cnrs.unistra.fr>
> > I think that the proper solution would be to enhance function
> > cleanup_undefined_types_1 to also look at symbols inside function
> > symbols. That way, the problem should be fixed for all kinds of
> > types, not just structs...
>
> I do not think that this is enough: the problem is more that
> TYPE_STUB macro refers to the flag_stub of main_type, which means
> that once the main_type flag_stub has been cleared, all types having
> the same main_type will also return zero for TYPE_STUB.
It's definitely something i got myself confused over. In the stabs I posted:
.stabs "t:p(0,21)=*(0,22)=k(0,23)=xsdummy:",160,0,28,-24
.stabs "dummy:T(0,23)=s16x:(0,1),0,32;y:(0,1),32,32;b:(0,13),64,64;;",128,0,0,0
Type dummy is numbered (0,23), whereas I talked myself into thinking
that type (0,23) would the be constant version of type dummy. With
that confusion cleared, we do indeed clear the stub condition on our
type at the time when we read the second stabs line above. So, by the
time we reach the cleanup_undefined_types_1 stage, the type is actually
no longer undefined.
> I still think that we should cycle over the type_chain when the type
> is parsed.
I am afraid this might be the only solution indeed. For some reason,
even after our pretty comprehensive investigating, I am still pretty
reluctant about it, and I think it is because it looks wrong to
perform this relatively unintuitive operation, and just do it for
structs. Conceivably, you'd need to do the same for enums as well,
right?
I think we can reduce my anxiety by:
- Adding detailed comments explaining what and why;
- Putting the code inside a function so that we can reuse it elsewhere
should the need arise;
Do you think that this would be an acceptable approach?
Sorry if I am slow, but stabsread, and stabs in general, are two horrible
deprecated pieces of technology - so it's hard to remain current.
--
Joel
next prev parent reply other threads:[~2010-04-22 1:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 20:40 Pierre Muller
2010-04-12 15:55 ` Joel Brobecker
2010-04-12 16:22 ` Pierre Muller
2010-04-13 15:28 ` Joel Brobecker
2010-04-21 15:11 ` Joel Brobecker
2010-04-21 21:11 ` Pierre Muller
2010-04-22 1:11 ` Joel Brobecker [this message]
2010-04-22 10:20 ` [RFA-v2] " Pierre Muller
2010-04-22 12:20 ` Joel Brobecker
2010-04-22 13:03 ` Pierre Muller
2010-04-22 13:26 ` Joel Brobecker
2010-04-22 13:39 ` Pierre Muller
[not found] <37072.6329427727$1270759254@news.gmane.org>
2010-04-09 15:55 ` [RFC] " Tom Tromey
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=20100422011119.GF19194@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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