From: Tom Tromey <tromey@adacore.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/exp] Fix printing of out of bounds struct members
Date: Wed, 24 Jan 2024 10:33:19 -0700 [thread overview]
Message-ID: <87ttn2iqlc.fsf@tromey.com> (raw)
In-Reply-To: <ee69cd12-3989-4df6-a51b-423c415d88bb@suse.de> (Tom de Vries's message of "Wed, 24 Jan 2024 17:15:16 +0100")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>> One thing I see here is that y.a is not one of the valid values. So
>> I
>> wonder if this kind of corruption should be detected at a different
>> spot, like throwing an exception from compute_variant_fields_inner.
>>
Tom> I've looked into that, but I think it requires a cleanup related to
Tom> TYPE_CODE_BOOL
In this particular test, I would have expect the variants to enumerate
the valid values, due to the 'when True' / 'when False'.
However, I see the compiler decides not to do that :-(
That is, it says:
<4><1158>: Abbrev Number: 8 (DW_TAG_variant)
<1159> DW_AT_discr_value : 1
<115a> DW_AT_sibling : <0x1169>
<5><115e>: Abbrev Number: 1 (DW_TAG_member)
[...]
<4><1169>: Abbrev Number: 9 (DW_TAG_variant)
<5><116a>: Abbrev Number: 1 (DW_TAG_member)
Tom
next prev parent reply other threads:[~2024-01-24 17:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 13:28 Tom de Vries
2024-01-22 16:29 ` Tom Tromey
2024-01-24 16:15 ` Tom de Vries
2024-01-24 17:33 ` Tom Tromey [this message]
2024-01-25 12:56 ` Tom de Vries
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=87ttn2iqlc.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).