public inbox for
 help / color / mirror / Atom feed
From: Tom Tromey <>
To: Stephan Rohr via Gdb-patches <>
Cc: Stephan Rohr <>
Subject: Re: [PATCH v3 1/1] gdb/dwarf2: Fix 'rw_pieced_value' for values casted to different type.
Date: Thu, 05 Jan 2023 12:52:53 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Stephan Rohr via Gdb-patches's message of "Wed, 21 Dec 2022 14:12:44 +0100")

>>>>> Stephan Rohr via Gdb-patches <> writes:

> From: "Rohr, Stephan" <>
> The 'rw_pieced_value' function is executed when fetching a (lazy)
> variable described by 'DW_OP_piece' or 'DW_OP_bit_piece'.  The
> function checks the 'type' and 'enclosing_type' fields of the value
> for identity.

Thanks for the patch.

> If a lazy value is fetched, GDB allocates space based on the enclosing
> type's length and typically reads the 'full' object.  This is not
> implemented for pieced values and causes an internal error if 'type'
> and 'enclosing_type' of a value are not identical.

> However, GDB can read the value based on its type.  Thus, this patch
> fixes the previously mentioned cases by removing the check for identity.

I thought there was some other discussion & idea about the cause of this
patch... something like, setting a value's type should reset the
enclosing type?  Or vice versa?  I am wondering if you tried this
approach instead.


  reply	other threads:[~2023-01-05 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 13:12 [PATCH v3 0/1] " Stephan Rohr
2022-12-21 13:12 ` [PATCH v3 1/1] " Stephan Rohr
2023-01-05 19:52   ` Tom Tromey [this message]
2023-01-06 19:22     ` Simon Marchi
2023-01-06 20:36       ` Tom Tromey
2023-01-09  8:12     ` Rohr, Stephan
2023-01-09 19:28       ` Tom Tromey
2023-01-10  9:29         ` Rohr, Stephan
2023-01-10 21:31           ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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).