From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id B1AC03892007 for ; Thu, 30 Apr 2020 13:24:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B1AC03892007 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x444.google.com with SMTP id f13so6843369wrm.13 for ; Thu, 30 Apr 2020 06:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tYnONGJeTiwfqSWqdneFw/DtWOEfpj2QNR/2SLUN56w=; b=DAToGZIKiZS41WIkteGnUAMmEOli5s/2CVPqYR9GriMj/BE4IrvAsThKxVgO/YWR4Z c/GXVhpHqOm4dOwUuLRsYgFnuxdZGcBWSTFMSkoOhPBBr5ArvFPc+aoOJ4Ub4cIlWopA MM0+7E9PoVOqWY8U8EZy/C3Hr/6TGsxib5ZgWEDgs/PvWNrv27GWThMoghDQp+bIzVb3 HTCcUK5Em1EtxNsTcJOgEQwNAxbiIJF5t6X4udh7tTmx3qwA0hyENnN4OcJfxNuuxhZA a45n/sNw5132lJV+PbO6wfhAL6ws+pvfGd65/Q2ODcCx0jhq6n0lKUQiaJ9/unWojJp2 alvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tYnONGJeTiwfqSWqdneFw/DtWOEfpj2QNR/2SLUN56w=; b=fopv7JBZFQGpAlYkBUBZgJ+F+LNiLFtuXi0w0LUYWCnZInOMF6TBBzcbJpebiWgQOl 4TkrcWvvbty/iv+AuURUwDMbB8gC0UMb9mZ7nwj6w785mYMWeymTHqDmtVMsH7cMuR2F yIrVSicRylckUHAVQkTWUCValiAyTvsa2OMSG78/Me8P1xQosNFx7vb2k0p+Jer3ZY1X HAXtKoR/YemVopZHnWvVrhh0WnkQStNSaIvMB0Ck8pFSQEhy1CZnauj57mQkdV2pxX1M Npw+30unfeAxGHGRWYkYnp8XOYkpwCla4r0l1IYwRglMqJllAlh+Xq/y67gMw8UdFU1t df1w== X-Gm-Message-State: AGi0PubWMAMD1LCKb5oCk73S4ZSX7/5xYyvwOV27FocMLxeR7NcGxjyZ uEcw2Eo4Oq+jnfVevCp+PXl7ZQ== X-Google-Smtp-Source: APiQypJ1Cdkn6i9AKsX1IEfBFf5EzRzh4NYpc0y7XDWhpxR0HzsMA4+0YiIMY6vcn4iJvNQv+x7diw== X-Received: by 2002:adf:8441:: with SMTP id 59mr4011345wrf.237.1588253068826; Thu, 30 Apr 2020 06:24:28 -0700 (PDT) Received: from localhost (host81-151-181-184.range81-151.btcentralplus.com. [81.151.181.184]) by smtp.gmail.com with ESMTPSA id d133sm13823022wmc.27.2020.04.30.06.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 06:24:28 -0700 (PDT) Date: Thu, 30 Apr 2020 14:24:27 +0100 From: Andrew Burgess To: Tom de Vries Cc: Sterling Augustine , Eric Christopher , gdb-patches Subject: Re: Recent commit in binutils-gdb Message-ID: <20200430132427.GM3522@embecosm.com> References: <41d74a1a-0748-4a40-6365-011ac0c2a2ff@polymtl.ca> <725b0ecd-7cfe-b93e-f9c8-953fca8c2502@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <725b0ecd-7cfe-b93e-f9c8-953fca8c2502@suse.de> X-Operating-System: Linux/5.5.17-200.fc31.x86_64 (x86_64) X-Uptime: 14:24:12 up 9 days, 23:53, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 13:24:40 -0000 * Tom de Vries [2020-04-30 07:49:56 +0200]: > On 30-04-2020 06:10, Sterling Augustine via Gdb-patches wrote: > > The commit was proposed here: > > > > https://sourceware.org/pipermail/gdb/2020-March/000012.html > > > > With reproducer: > ... > $ cat b.cpp > namespace hide { struct Bar { int y; }; } > struct Foo { hide::Bar* b; }; > > inline void x() { hide::Bar b; } > > static Foo aFoo; > > void * f() { > return aFoo.b; > } > > int main() { > f(); > return 0; > } > $ g++ -fdebug-types-section b.cpp -g > $ ./build/gdb/gdb -ex "b f" -ex run -ex "ptype hide::Bar" ./a.out > ... > > I can reproduce this problem before the recent commit 770479f223e "gdb: > Fix toplevel types with -fdebug-types-section", but not after. > > Also, when I revert commit 770479f223e, and leave this one in place, it > doesn't fix the problem. That seems to be because the proposed commit: > ... > @@ -10954,6 +10954,7 @@ dwarf2_cu::setup_type_unit_groups (struct > die_info *die) > compunit_language (cust), > 0, cust)); > > + list_in_scope = get_builder ()->get_file_symbols (); > auto &file_names = line_header->file_names (); > for (i = 0; i < file_names.size (); ++i) > { > ... > and the actual commit differ (note the different in context before): > ... > @@ -10942,6 +10942,7 @@ dwarf2_cu::setup_type_unit_groups (struct > die_info *die) > = XOBNEWVEC (&COMPUNIT_OBJFILE (cust)->objfile_obstack, > struct symtab *, line_header->file_names_size ()); > > + list_in_scope = get_builder ()->get_file_symbols (); > auto &file_names = line_header->file_names (); > for (i = 0; i < file_names.size (); ++i) > { > ... > > In summary, the problem was fixed by an earlier commit, and this commit > was misapplied. I think we should probably revert this one. FWIW I agree. Thanks, Andrew