From: "Rohr, Stephan" <stephan.rohr@intel.com>
To: Tom Tromey <tom@tromey.com>,
Stephan Rohr via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simark@simark.ca>
Subject: RE: [PATCH v3 1/1] gdb/dwarf2: Fix 'rw_pieced_value' for values casted to different type.
Date: Mon, 9 Jan 2023 08:12:25 +0000 [thread overview]
Message-ID: <DM6PR11MB4564B3D669F947EA5D9F4A6093FE9@DM6PR11MB4564.namprd11.prod.outlook.com> (raw)
In-Reply-To: <875ydkep2i.fsf@tromey.com>
Hi Tom.
> -----Original Message-----
> From: Tom Tromey <tom@tromey.com>
> Sent: Thursday, January 5, 2023 8:53 PM
> To: Stephan Rohr via Gdb-patches <gdb-patches@sourceware.org>
> Cc: Rohr, Stephan <stephan.rohr@intel.com>
> Subject: Re: [PATCH v3 1/1] gdb/dwarf2: Fix 'rw_pieced_value' for values
> casted to different type.
>
> >>>>> Stephan Rohr via Gdb-patches <gdb-patches@sourceware.org>
> writes:
>
> > From: "Rohr, Stephan" <stephan.rohr@intel.com> 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.
>
> Tom
There was a discussion with Simon whether the value cast should update the
enclosing type. Simon tried it out but as I understood he's also not clear on
what the right answer answers are. From my point of view, this would also
be a separate patch.
Thanks
Stephan
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2023-01-09 8:12 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
2023-01-06 19:22 ` Simon Marchi
2023-01-06 20:36 ` Tom Tromey
2023-01-09 8:12 ` Rohr, Stephan [this message]
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:
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=DM6PR11MB4564B3D669F947EA5D9F4A6093FE9@DM6PR11MB4564.namprd11.prod.outlook.com \
--to=stephan.rohr@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=tom@tromey.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).