From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38559 invoked by alias); 19 Jan 2020 02:04:00 -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 38532 invoked by uid 89); 19 Jan 2020 02:03:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=hints, our 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; Sun, 19 Jan 2020 02:03:54 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D86021E47D; Sat, 18 Jan 2020 21:03:52 -0500 (EST) Subject: Re: [PATCH] Fix toplevel types with -fdebug-types-section From: Simon Marchi To: Mark Williams , gdb-patches@sourceware.org References: <79aec7d1-787d-1693-c0b7-b8bb53cdf3b4@simark.ca> Message-ID: <70d20408-1f27-560c-aa9e-a496624e1113@simark.ca> Date: Sun, 19 Jan 2020 02:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <79aec7d1-787d-1693-c0b7-b8bb53cdf3b4@simark.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-01/txt/msg00578.txt.bz2 On 2020-01-18 8:59 p.m., Simon Marchi wrote: > On 2020-01-18 1:53 p.m., Mark Williams wrote: >> Per https://sourceware.org/bugzilla/show_bug.cgi?id=24480 toplevel >> types were broken by >> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=93b8bea4143cafae79076076c64aaa4c46a9b73c >> because it only set list_in_scope in start_sym_tab. With type-units, >> It also needs to be set when re-opening a symtab. >> >> Mark >> > > Hi Mark, > > Thanks for sending a patch. > > Can you please put a bit more information in the commit message? In particular: > > - An illustration of the problem, and how to reproduce it > - Why/how this patch fixes the problem > > There are good elements about that in the bug report discussions, it's just a matter > of synthesizing them in the commit message. > > Thanks, > > Simon > Oh, and also we try our best to add a test (in gdb/testsuite) when we fix a bug, so that this particular bug doesn't come back later. I think this is something that would be pretty easy to test. That test would probably belong in testsuite/gdb.dwarf2, since this is quite dwarf-specific. There are hints on how to write tests here: https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Building_the_Example_Program Simon