From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: Gary Benson via Gdb-patches <gdb-patches@sourceware.org>
Subject: [committed][PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang
Date: Mon, 30 Nov 2020 13:51:15 +0100 [thread overview]
Message-ID: <64abcab8-b84c-775e-3e77-cbc40510cc17@suse.de> (raw)
In-Reply-To: <e7faf59d-dcff-6e6c-94bb-77656596704c@suse.de>
On 11/23/20 11:34 AM, Tom de Vries wrote:
> [ was: Re: [PATCH] KFAIL variable-length array tests which fail with Clang ]
>
> On 11/20/20 5:51 PM, Tom Tromey wrote:
>>>> I don't really understand the is_reference stuff
>>
>> Tom> In case a dwarf expression is used for an DW_AT_location attribute, by
>> Tom> default it represents an address, and needs to be dereferenced to get
>> Tom> the value.
>>
>> Yeah, I guess I'd need to see some examples to understand why this
>> decision is made here and not at the point of use.
>>
>>>> Anyway, gdb can't do this sort of check. It will fail if the expression
>>>> has a different shape, which is completely allowed by the spec.
>>
>> Tom> AFAIU, the spec specifically says how to interpret a DW_OP_stack_value
>> Tom> at the end of the dwarf expression which is used a location description,
>> Tom> and the code in the patch follows that reasoning.
>> ...
>> Tom> So, for my understanding, can you give an example of the problem you're
>> Tom> envisioning?
>>
>> Nothing prevents an expression from ending with some other DW_OP_* with
>> 0x9f as an operand to the opcode. This would confuse this simple
>> checker. Or to put it another way, nothing guarantees that the last
>> byte of an expression is an opcode. I think it could even be both,
>> depending on a runtime condition, because AFAIK nothing prevents a DWARF
>> expression from branching to the middle of some other operation.
>
> Hmm, indeed, thanks for pointing this out. That means that this needs
> to be dealt with in the evaluator. AFAICT, DWARF_VALUE_STACK is used
> already to represent the DW_OP_stack_value op in the evaluator, it's
> just not used for this scenario.
>
> Another try below. Any more comments?
>
Committed.
Thanks,
- Tom
prev parent reply other threads:[~2020-11-30 12:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 17:17 [PATCH] KFAIL variable-length array tests which fail with Clang Gary Benson via Gdb-patches
2020-11-18 16:14 ` Tom Tromey
2020-11-19 22:53 ` Tom de Vries
2020-11-20 15:15 ` [PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang Tom de Vries
2020-11-21 17:16 ` [gdb/testsuite] Add clang xfail in gdb.base/vla-ptr.exp Tom de Vries
2020-11-20 15:50 ` [PATCH] KFAIL variable-length array tests which fail with Clang Tom Tromey
2020-11-20 16:30 ` Tom de Vries
2020-11-20 16:51 ` Tom Tromey
2020-11-23 10:34 ` [PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang Tom de Vries
2020-11-25 14:50 ` Gary Benson via Gdb-patches
2020-11-25 15:25 ` Gary Benson via Gdb-patches
2020-11-25 20:05 ` Tom de Vries
2020-11-26 10:10 ` Gary Benson via Gdb-patches
2020-11-30 12:51 ` Tom de Vries [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=64abcab8-b84c-775e-3e77-cbc40510cc17@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--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