Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Denis Lukianov <denis@voxelsoft.com>, gdb-patches@sourceware.org
Cc: andrew.burgess@embecosm.com
Subject: Re: [PATCH] dwarf2: Fix dwarf stack fetch array view size mismatch
Date: Fri, 19 Aug 2022 20:55:22 -0400	[thread overview]
Message-ID: <e56b774d-4134-f1b4-0c24-34b278be6a65@polymtl.ca> (raw)
In-Reply-To: <8bfea13a0966a62eca9cd39617918cff04915b34.camel@voxelsoft.com>



On 2022-08-19 17:33, Denis Lukianov wrote:
> On Thu, 2022-08-18 at 12:27 -0400, Simon Marchi wrote:
>> On 8/8/22 07:24, Denis Lukianov wrote:
>>
>>
>> Your patch reminded me of a pending patch I had in the same area,
>> which
>> I just merged:
>>
>>  
>> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bde195b84a862f31ac111c0881ad13b89ee89492
>>
>> Maybe you were seeing the same problem as described there?
>>
>> Simon
> 
> Hi Simon,
> 
> Your check_typedef fixes my use case on little endian architectures.
> 
> However, note that DWARF_VALUE_STACK case also re-slices the source
> val. It looks like after that it remains mismatched to the destination
> which also must be re-sliced to match (as per my patch, or implicitly
> back when this was a simple memcpy with a single length). I have no big
> endian resource configured to test this.

I don't understand what you are saying.  All I can see is that the
source array_view size will be of the length of subobj_type: we call
slice with length == len, where len is `TYPE_LENGTH (subobj_type)`.  And
the destination array_view size is also of the length of subobj_type:
retval was allocated as `allocate_value (subobj_type)`, so its contents
are of the length of subobj_type.

Simon

  reply	other threads:[~2022-08-20  0:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 11:24 Denis Lukianov
2022-08-18 16:27 ` Simon Marchi via Gdb-patches
2022-08-19 21:33   ` Denis Lukianov
2022-08-20  0:55     ` Simon Marchi via Gdb-patches [this message]
2022-08-20  1:38       ` Denis Lukianov
2022-08-20  1:55         ` Denis Lukianov
2022-08-21 14:17           ` Simon Marchi via Gdb-patches

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=e56b774d-4134-f1b4-0c24-34b278be6a65@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=andrew.burgess@embecosm.com \
    --cc=denis@voxelsoft.com \
    --cc=simon.marchi@polymtl.ca \
    /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