From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org, Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [patch] Fix internal error on optimized-out values (regression by me)
Date: Tue, 11 Oct 2011 17:33:00 -0000 [thread overview]
Message-ID: <m38vora2bu.fsf@fleche.redhat.com> (raw)
In-Reply-To: <201110102240.28440.pedro@codesourcery.com> (Pedro Alves's message of "Mon, 10 Oct 2011 22:40:28 +0100")
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> It just happens that today, we only support either wholy
Pedro> optimized-out values, or wholly not optimized-out values. A
Pedro> compiler can flatten out structures and optimize out just some
Pedro> unused fields (of local vars, most usefully). When
Pedro> we get to support that, it'll follow naturally that a single
Pedro> optimized out flag per value isn't sufficient, and that
Pedro> ((struct) <optimized out>).field will need to be able to
Pedro> be <optimized out>.
Actually I think GCC can already do all of this, and GDB can
(supposedly) handle it. There are a couple of lval_computed methods
used to handle this -- check_validity and check_any_valid.
I don't remember how value_primitive_field was supposed to work with
this exactly, but I think the key is that set_value_component_location
on the new value correctly inherits the 'computed' vtable; so the
optimized-out status bits are preserved by this operation.
Given this I tend to think that the patch that went in is incorrect, in
that it may break operations on an SRA'd structure where some bits are
optimized away. I thought I added tests for this, not sure though.
Tom
next prev parent reply other threads:[~2011-10-11 17:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 19:26 Jan Kratochvil
2011-09-27 13:41 ` Jan Kratochvil
2011-10-03 19:34 ` Tom Tromey
2011-10-10 20:54 ` Jan Kratochvil
2011-10-10 21:40 ` Pedro Alves
2011-10-11 17:33 ` Tom Tromey [this message]
2011-10-12 20:11 ` Jan Kratochvil
2011-10-13 15:18 ` Tom Tromey
2011-10-13 16:36 ` Jan Kratochvil
2011-10-12 20:33 ` Jan Kratochvil
2011-10-13 15:27 ` Pedro Alves
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=m38vora2bu.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=pedro@codesourcery.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