From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 95C3A385842A for ; Fri, 27 Jan 2023 15:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 95C3A385842A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.170] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 029A91E110; Fri, 27 Jan 2023 10:56:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1674835015; bh=5k0su5II2ODF8eB26VPV9w8OQiZvcwv8eoC2GyCnUYs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=leT5yj+VluCJfrB0WPyFcBw412XiCSpgx+NGphU92Jp27J0ih9v+M58w5eitG7RG8 qPfEo8RPlWUOwWDXP5u5q/xJeVmUln0Mk5Nzty4Cp8mDO3uB4/xQo8/14EtwUAF7bO s1MwpOVPrcRYTzTgtXwyMfuY52vrFSBPaPOGPcB8= Message-ID: Date: Fri, 27 Jan 2023 10:56:54 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] Make gdb.ada/ptype_tagged_param.exp pass Content-Language: fr To: Tom Tromey Cc: Simon Marchi via Gdb-patches References: <20230119163150.492922-1-tromey@adacore.com> <874jslyw58.fsf@tromey.com> <87r0vgqd77.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87r0vgqd77.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/27/23 09:11, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> Woops, I hit a FAIL here. I think the $has_runtime_debug_info condition > Simon> is backwards > > I can check in a patch to flip this if you think that will help. I have > no way to test it, though. I tried installing and removing the relevant > debuginfo packages on my machine, but the test works either way for me. So, the current code is: 50 -re -wrap $nodebug { 51 if {$has_runtime_debug_info} { 52 kfail "no debug info" $gdb_test_name 53 } else { 54 fail $gdb_test_name 55 } 56 } This says: if we receive the wrong output, and we have GNAT debug info, this is expected. I think it's wrong, it should be: if we receive the wrong output and we _don't_ have debug info, this is expected. I see this on Ubuntu 22.04, with the gnat-11 package installed. Without libgnat-11-dbgsym, I get: (gdb) ptype s type = tagged record x: integer; y: integer; end record (gdb) FAIL: gdb.ada/ptype_tagged_param.exp: ptype s And with libgnat-11-dbgsym installed: type = new pck.shape with record r: integer; end record (gdb) PASS: gdb.ada/ptype_tagged_param.exp: ptype s If I flip the condition to what I think makes more sense, the former (without libgnat-11-dbgsym) case becomes: type = tagged record x: integer; y: integer; end record (gdb) KFAIL: gdb.ada/ptype_tagged_param.exp: ptype s (PRMS: no debug info) And the "with libgnat-11-dbgsym" case still passes fine, since it outputs the right thing. Simon