From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104182 invoked by alias); 20 Jul 2019 13:47:59 -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 104125 invoked by uid 89); 20 Jul 2019 13:47:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:944, interest X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 20 Jul 2019 13:47:57 +0000 Received: by mail-wr1-f68.google.com with SMTP id y4so34897544wrm.2 for ; Sat, 20 Jul 2019 06:47:57 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:4c97:6d52:2cea:997b? ([2001:8a0:f913:f700:4c97:6d52:2cea:997b]) by smtp.gmail.com with ESMTPSA id c65sm30478436wma.44.2019.07.20.06.47.54 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 20 Jul 2019 06:47:54 -0700 (PDT) Subject: Re: [PATCH 3/3] gdb: Show type summary for anonymous structures from c_print_typedef To: Andrew Burgess , gdb-patches@sourceware.org References: <4b4c8db945d3fbd3334b303b7acfa6d2c71b6bf6.1562931337.git.andrew.burgess@embecosm.com> <3df72c85-469b-de6d-adb3-7e7d9ffd8278@redhat.com> <20190719210636.GD23204@embecosm.com> From: Pedro Alves Message-ID: <1fcef366-f0ca-4503-b5cf-b280120c95cf@redhat.com> Date: Sat, 20 Jul 2019 13:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190719210636.GD23204@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00483.txt.bz2 On 7/19/19 10:06 PM, Andrew Burgess wrote: > An additional area of interest is how C++ handles anonymous types used > within a typedef; enums are handled basically inline with how C > handles them, but structs (and classes) are slightly different. The > behaviour before the patch is different, and is unchanged by this > patch. Consider this code compiled for C++: > > typedef struct { > int i; > } struct_t; > > Both before and after this patch, this is show by 'info types' as: > > 3: typedef struct_t struct_t; Curious, and odd. > gdb/ChangeLog: > > * c-typeprint.c (c_print_typedef): Pass -1 instead of 0 to > type_print. > > gdb/testsuite/ChangeLog: > > * gdb.ada/info_auto_lang.exp: Update expected results. > * gdb.base/info-types.c: Add additional types to check. > * gdb.base/info-types.exp: Update expected results. LGTM. Thanks, Pedro Alves