Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Hannes Domani <ssbssa@yahoo.de>,
	Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][PR gdb/18706] Calculate size of array of stubbed type
Date: Wed, 29 Apr 2020 14:26:16 -0400	[thread overview]
Message-ID: <03ddcdaa-4df2-2a08-3de7-4c6b95a44204@simark.ca> (raw)
In-Reply-To: <2135104991.4527821.1588179506131@mail.yahoo.com>

On 2020-04-29 12:58 p.m., Hannes Domani via Gdb-patches wrote:
>> For your code to work (and it appears to work, I just want to understand),
>> it means that at some point, we changed the target of the array type to
>> point to a `struct type` that does have size information.  I'm guessing
>> using the information from the other CU.  I'm wondering when/how this happens.
> 
> It happens a few lines above the array stuff:
> 
>   if (TYPE_TARGET_STUB (type))
>     {
>       struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
> 
> At this point, the struct has TYPE_STUB set, so check_typedef replaces the
> stub with the complete type.

Ah I see the lookup_symbol call now, thanks.

> OK, I will remove both the TYPE_NFIELDS and TYPE_CODE_RANGE checks.

Ok, thanks (although please give it a quick look and make sure you reach the
same conclusion as me).

Simon


      reply	other threads:[~2020-04-29 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200427114154.2275-1-ssbssa.ref@yahoo.de>
2020-04-27 11:41 ` Hannes Domani
2020-04-28 15:10   ` Simon Marchi
2020-04-29 12:47     ` Hannes Domani
2020-04-29 16:39       ` Simon Marchi
2020-04-29 16:58         ` Hannes Domani
2020-04-29 18:26           ` Simon Marchi [this message]

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=03ddcdaa-4df2-2a08-3de7-4c6b95a44204@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=ssbssa@yahoo.de \
    /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