This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix type of values representing optimized out static members
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Cc: Simon Marchi <simark at simark dot ca>
- Date: Wed, 7 Feb 2018 12:23:46 +0000
- Subject: Re: [PATCH] Fix type of values representing optimized out static members
- Authentication-results: sourceware.org; auth=none
- References: <1517860836-9587-1-git-send-email-simon.marchi@ericsson.com>
On 02/05/2018 08:00 PM, Simon Marchi wrote:
> From: Simon Marchi <simark@simark.ca>
>
> As reported here:
>
> https://sourceware.org/ml/gdb/2018-02/msg00019.html
>
> the type of values representing static members that are optimized out is
> wrong. It currently assigns the type of the containing class rather
> than the type of the field. This patch fixes that.
>
> I found a place in m-static.exp already dealing with optimized out
> static members, so I just added some gdb_test there.
>
> gdb/ChangeLog:
>
> * value.c (value_static_field): Assign field type instead of
> containing type when returning an optimized out value.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.cp/m-static.exp: Check type of optimized out static
> member.
Looks right. OK.
Thanks,
Pedro Alves