From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DJOyH3QIlGCoJQAAWB0awg (envelope-from ) for ; Thu, 06 May 2021 11:17:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 74B071F11C; Thu, 6 May 2021 11:17:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BB00A1E54D for ; Thu, 6 May 2021 11:17:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 396D1388E818; Thu, 6 May 2021 15:17:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 396D1388E818 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620314227; bh=PvANnIxPEXZ6qyKDumSd0FJSa/0QrPdnFR2V+0KnGSo=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OH1o0vMiJnCrkmh1I69mHUu+B8jai6qn0AxdISbD4egNjGndpfUaLsCgH1zWKXbAL 06lRoSNY9smX5v+39ogF3Ej1nRCVri37K6heYSAVqlgkrTI1Weq6zBNf0pBeHoS+0a w1WFXS0l10dovH3lKkDu3f3mXP7YLeOqBQHsdUUk= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 9CD0E388C014 for ; Thu, 6 May 2021 15:17:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9CD0E388C014 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44010) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lefkE-0006tW-6O; Thu, 06 May 2021 11:16:58 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1660 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1lefkD-0007oC-BA; Thu, 06 May 2021 11:16:54 -0400 Date: Thu, 06 May 2021 18:16:41 +0300 Message-Id: <83fsyzevty.fsf@gnu.org> To: Tom de Vries In-Reply-To: <20210506120247.GA1559@delia.home> (message from Tom de Vries on Thu, 6 May 2021 14:02:49 +0200) Subject: Re: [PATCH][gdb/symtab] Fix infinite recursion in dwarf2_cu::get_builder() References: <20210506120247.GA1559@delia.home> 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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: tom@tromey.com, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > Date: Thu, 6 May 2021 14:02:49 +0200 > From: Tom de Vries > Cc: Tom Tromey > > Removing this code (that is, doing SYMBOL_IS_ARGUMENT (sym) = 1 > unconditially), fixes the crash. The ancestor variable also seems to have > been added specifically to deal with fallout from this code, so remove that as > well. > > Tested on x86_64-linux: > - openSUSE Leap 15.2 with gcc 7.5.0, and > - openSUSE Tumbleweed with gcc 10.3.0. > > Any comments? > > Thanks, > - Tom > > [gdb/symtab] Fix infinite recursion in dwarf2_cu::get_builder() > > gdb/ChangeLog: > > 2021-05-06 Tom de Vries > > PR symtab/26327 > * dwarf2/read.c (struct dwarf2_cu): Remove ancestor. > (dwarf2_cu::get_builder): Remove ancestor-related code. > (new_symbol): Remove code supporting pre-4.1 gcc that show arguments > of inlined functions as locals. > (follow_die_offset, follow_die_sig_1): Remove setting of ancestor. > > --- > gdb/doc/gdb.texinfo | 4 ++-- > gdb/dwarf2/read.c | 25 ++----------------------- > 2 files changed, 4 insertions(+), 25 deletions(-) > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 56f37eb2288..f4d7085da58 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -13842,8 +13842,8 @@ when using @sc{dwarf 2}. Versions of @value{NGCC} before 4.1 > do not emit two required attributes (@samp{DW_AT_call_file} and > @samp{DW_AT_call_line}); @value{GDBN} does not display inlined > function calls with earlier versions of @value{NGCC}. It instead > -displays the arguments and local variables of inlined functions as > -local variables in the caller. > +displays local variables of inlined functions as local variables in > +the caller. > > The body of an inlined function is directly included at its call site; > unlike a non-inlined function, there are no instructions devoted to > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c I'm not sure I understand why you are changing the manual as part of this fix?