public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [patch+7.8] Fix 7.8 regression: resolve_dynamic_struct: Assertion `TYPE_NFIELDS (type) > 0' (PR 17642)
Date: Sat, 13 Dec 2014 18:18:00 -0000	[thread overview]
Message-ID: <CADPb22T2jbRrFHuYUj2iacPc+iHGO=X+cpYfRLqOZ1yGSKsWLQ@mail.gmail.com> (raw)
In-Reply-To: <20141213142351.GG5457@adacore.com>

On Sat, Dec 13, 2014 at 6:23 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> -  switch (TYPE_CODE (type))
>> +  if (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
>>      {
>> -    case TYPE_CODE_TYPEDEF:
>>        resolved_type = copy_type (type);
>>        TYPE_TARGET_TYPE (resolved_type)
>>       = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type), addr,
>>                                        top_level);
>> -      break;
>> +    }
>> +  else
>
> Trailing space here...
>
>> +    {
>> +      /* Typedefs do not need to be preserved here but we need
>> +      to resolve any possible stub types.  */
>> +      type = real_type;
>
> It took me a moment, despite your added comment, to understand that
> it was not so much about TYPE_CODE_TYPEDEF but about stubs! I keep
> forgetting that check_typedef does more than unwrapping typedef
> layers.

Yeah. PR 17450 describes this a bit better IMO.

https://sourceware.org/bugzilla/show_bug.cgi?id=17450

  parent reply	other threads:[~2014-12-13 18:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 19:54 Jan Kratochvil
2014-12-13 14:23 ` Joel Brobecker
2014-12-13 14:39   ` [commit] " Jan Kratochvil
2014-12-13 18:18   ` Doug Evans [this message]
2014-12-15 15:06   ` Joel Brobecker
2014-12-15 15:21     ` Jan Kratochvil
2014-12-15 19:12     ` [commit 7.8] " Jan Kratochvil
2014-12-15 19:23       ` H.J. Lu
2014-12-15 19:37         ` Joel Brobecker
2014-12-15 20:02           ` H.J. Lu
2014-12-15 20:41             ` Joel Brobecker
2014-12-15 21:09               ` H.J. Lu
2014-12-15 22:11                 ` H.J. Lu
2014-12-15 22:44                   ` Joel Brobecker
2014-12-15 22:53                     ` H.J. Lu

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='CADPb22T2jbRrFHuYUj2iacPc+iHGO=X+cpYfRLqOZ1yGSKsWLQ@mail.gmail.com' \
    --to=dje@google.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).