From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76863 invoked by alias); 7 Feb 2018 13:50:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 76851 invoked by uid 89); 7 Feb 2018 13:50:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Feb 2018 13:50:24 +0000 Received: by simark.ca (Postfix, from userid 112) id 32D621E759; Wed, 7 Feb 2018 08:50:22 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 2561B1E4F4; Wed, 7 Feb 2018 08:50:21 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 07 Feb 2018 13:50:00 -0000 From: Simon Marchi To: Pedro Alves Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix type of values representing optimized out static members In-Reply-To: <4fc7ac76-dfe5-3113-7c9a-f29d3d023b3d@redhat.com> References: <1517860836-9587-1-git-send-email-simon.marchi@ericsson.com> <4fc7ac76-dfe5-3113-7c9a-f29d3d023b3d@redhat.com> Message-ID: <9aeeb2f46d96a1e6284fb8c5dab523f8@simark.ca> X-Sender: simark@simark.ca User-Agent: Roundcube Webmail/1.3.4 X-SW-Source: 2018-02/txt/msg00119.txt.bz2 On 2018-02-07 07:23, Pedro Alves wrote: > On 02/05/2018 08:00 PM, Simon Marchi wrote: >> From: Simon Marchi >> >> 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 Thanks, pushed. Simon