From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id w/lbE5CU4mkULSAAWB0awg (envelope-from ) for ; Fri, 17 Apr 2026 16:14:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1776456848; bh=8FmDsPs6DYQcxglw4t0k7TlsGKS5QZScDU4HGLAQ0U0=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=f0xo6TCJVkmCId9qF+KI7WEbgtwEj5vLqyggmCbNKnM8nnfiS0AsKmljDW6fOUASL pDdcIGXtgfdERoELPypp3hmP+9y5yi3CacOCxNRfquB/yZgbaG23CSOXlK4PIqVrZT b9XCSjDkD6r3P89jlxpeG3DVPnod5GWGCAXRrsJg= Received: by simark.ca (Postfix, from userid 112) id 3F6BC1E0B1; Fri, 17 Apr 2026 16:14:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=m1YctWky; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 91D1D1E04F for ; Fri, 17 Apr 2026 16:14:07 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 12F724D108D0 for ; Fri, 17 Apr 2026 20:14:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12F724D108D0 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=m1YctWky Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id D851E4D8D1E8 for ; Fri, 17 Apr 2026 20:10:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D851E4D8D1E8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D851E4D8D1E8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776456657; cv=none; b=wIRe+7Whfq5d/apzR5A/LJqqtzs5+PuW8ar2Ti7on0P0semXyYMUT/hzls+1mQwrEKauhi2lzfARALih9B7fmO7D15Lt+SLvXQ4fGDVdwLVmTRP2pJJ+CP2i8Tq/t/+l8Mw25ulVqLlOwU7ZF42mHvnVKApJjuDfhXdcu04Aawc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776456657; c=relaxed/simple; bh=8FmDsPs6DYQcxglw4t0k7TlsGKS5QZScDU4HGLAQ0U0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Hqu4oySpMfy7W+xuDZXxJmLgXpEtFnFfWvirpF0h8ekic4+fNFhxpq40wsc3+CmzSHuU3XOMcfasS+vZFAO6LB2A6ZjWUIGKleX/0YnsbMc4ZEYogNtxpXL6J7iqJQjc9hVixxfWl2IS3IHWJw6c22P3uRuRpUXv89U0BLLqHc0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D851E4D8D1E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1776456655; bh=8FmDsPs6DYQcxglw4t0k7TlsGKS5QZScDU4HGLAQ0U0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=m1YctWkyAxy0rCVeOhKY/gT9GdTfsK9u2gGmFOLVSSzkSM6q2dX1UYpJz5WVGwI8j qngcuLyzNABxhJHNVDFMsC/Q5qdWVQMzDdwYg4NDFaWG48TK2QwuONfXDOWGyyfO4a 9e9kNYqj8sYZL2JrmzcSbDNbU/cKNz1LcC3mIMvo= Received: by simark.ca (Postfix) id 3C7751E04F; Fri, 17 Apr 2026 16:10:54 -0400 (EDT) Message-ID: <1ad6165b-d023-4e19-8500-9c6bd5f815a1@simark.ca> Date: Fri, 17 Apr 2026 16:10:53 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/6] Remove some dead code from buildsym.c To: Tom Tromey , gdb-patches@sourceware.org References: <20260417-list-in-scope-v1-0-0deb050fc03d@adacore.com> <20260417-list-in-scope-v1-2-0deb050fc03d@adacore.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260417-list-in-scope-v1-2-0deb050fc03d@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 4/17/26 2:24 PM, Tom Tromey wrote: > This patch removes some code from buildsym.c that, according to the > comment, was only used for some SCO or maybe COFF thing. This code is > dead now, and it was a hack anyway and probably should never have been > allowed. > --- > gdb/buildsym.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/gdb/buildsym.c b/gdb/buildsym.c > index aa95889424b..f6cc5c153c2 100644 > --- a/gdb/buildsym.c > +++ b/gdb/buildsym.c > @@ -635,18 +635,8 @@ buildsym_compunit::end_compunit_symtab_get_static_block (CORE_ADDR end_addr, > /* Make a block for the local symbols within. */ > finish_block (cstk.name, cstk.old_blocks, NULL, > cstk.start_addr, end_addr); > - > - if (!m_context_stack.empty ()) > - { > - /* This is said to happen with SCO. The old coffread.c > - code simply emptied the context stack, so we do the > - same. FIXME: Find out why it is happening. This is not > - believed to happen in most cases (even for coffread.c); > - it used to be an abort(). */ > - complaint (_("Context stack not empty in end_compunit_symtab")); > - m_context_stack.clear (); > - } > } I wonder if the whole if above is still useful. It seems to me like debug readers (pretty much just DWARF nowadays) should not leave a function scope open. And I guess that the DWARF reader goes not. I did put a gdb_assert_not_reached in there and ran a few tests and it didn't trigger. In other words, I wonder if you could remove that if and just keep the gdb_assert (m_context_stack.empty ()); Simon