Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Fix bug report 11479
Date: Wed, 21 Apr 2010 21:11:00 -0000	[thread overview]
Message-ID: <001501cae197$280ca8b0$7825fa10$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20100421151117.GA13675@adacore.com>



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Wednesday, April 21, 2010 5:11 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] Fix bug report 11479
> 
> > >   But this is the trouble,
> > > the chain was not cycled before my patch,
> > > and thus the 'const type' was never resolved and its length
> > > was still left at zero.
> > >   I didn't really get what the loop line 4465
> > > is supposed to do, but it only operates on LOC_TYPEDEF,
> > > and on the file_symbol level, not at argument list of functions...
> 
> Pierre - I understand now what you were trying to say.  The problem in
> this situation is that there are no global variable of the type that
> we need to fix.
> 
> 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.
> The following should work: In the loop over file_symbols, check
> the symbol type: If it is a function, then get the function block,
> and iterate again on all symbols inside that block. If not a function,
> then we match the symbol itself.  We will probably need to move the
> symbol matching condition to its own function to avoid duplication...

  I still think that we should cycle over the type_chain
when the type is parsed.
  Otherwise we need your suggestion, plus a
check of for all types still having zero length.

But I still think that my patch is
already a good step. At least for 
the problem I presented in the bug report.

Pierre


  reply	other threads:[~2010-04-21 21: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 [this message]
2010-04-22  1:11           ` Joel Brobecker
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='001501cae197$280ca8b0$7825fa10$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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