From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qjT5IldP4mI91hsAWB0awg (envelope-from ) for ; Thu, 28 Jul 2022 04:56:55 -0400 Received: by simark.ca (Postfix, from userid 112) id 815E01E9ED; Thu, 28 Jul 2022 04:56:55 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tVrm52Mp; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 1BAA51E9E9 for ; Thu, 28 Jul 2022 04:56:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CCDA385841D for ; Thu, 28 Jul 2022 08:56:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CCDA385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1658998613; bh=O4Jbe+pViR3qhMrWL+1g6edXKVC6hDVtt9Cf5ye22xw=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=tVrm52MpnRoZooSyHNh7N01uUHZeFsDHcroKOx3OMMi+/CPpwB9fMROqmfUBMkbqK uNFdsowpZ6uKs+bceaBPdoMFbQeczddTGcSAccsEF/nVc26RL+6cF6jgJyq8KIrNam QMrpdY71DOqlCKPuuyHT+Llk6dB4BTYIDvHky2BU= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 65B62385841D for ; Thu, 28 Jul 2022 08:56:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65B62385841D Received: from octopus (unknown [IPv6:2a01:e34:ef9a:d0b0:57ae:813d:1513:9ef2]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 91B1188460; Thu, 28 Jul 2022 08:56:31 +0000 (UTC) Date: Thu, 28 Jul 2022 09:56:26 +0100 To: Simon Marchi Subject: Re: [PATCH] gdb: call check_typedef at beginning of dwarf_expr_context::fetch_result Message-ID: <20220728085607.hicavv2k2tg4jfew@octopus> References: <20220728013422.2561677-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220728013422.2561677-1-simon.marchi@efficios.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Thu, 28 Jul 2022 08:56:32 +0000 (UTC) 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: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, [...] > diff --git a/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp > new file mode 100644 > index 00000000000..3a3740234fa > --- /dev/null > +++ b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp > @@ -0,0 +1,36 @@ > +# Copyright 2022 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# The program associated to this test case uncovered a bug in GDB (PR 29374) > +# where a typedef type was used before it was resolved. > + > +standard_testfile .S Shouldn’t there be something like: if { ![istarget x86_64-*-linux* ] } { return } or similar to make sure that we do not try to compile this .S file on incompatible archs? Best, Lancelot. > + > +if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {c++}] != ""} { > + return > +} > + > +clean_restart $binfile > + > +if {![runto_main]} { > + return > +} > + > +gdb_test "catch throw" "Catchpoint $::decimal \\(throw\\)" > +gdb_test "continue" "Catchpoint $::decimal \\(exception thrown\\).*" > + > +# Without the corresponding fix, GDB would hit an internal error before > +# printing the frame for main. > +gdb_test "backtrace" " $::hex in func \\(t=t@entry=@$::hex: 1234\\).* $::hex in main .*" > -- > 2.37.1 >