From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eN9uO5MVqmgYugoAWB0awg (envelope-from ) for ; Sat, 23 Aug 2025 15:25:07 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bRicos7Z; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E39CB1E023; Sat, 23 Aug 2025 15:25:07 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2C5EB1E023 for ; Sat, 23 Aug 2025 15:25:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B43143858428 for ; Sat, 23 Aug 2025 19:25:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B43143858428 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bRicos7Z Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 714733858C40 for ; Sat, 23 Aug 2025 19:24:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 714733858C40 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 714733858C40 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755977075; cv=none; b=EX7VSrXvuMEnVTPeSdkq/8Xl9I1VLRfuHETg9n4wcjnqoabPRnD8uZX9ABj4/iem2nZA4envlph1lN8rRMKoQLda4Yz3ut1mKaBitoTD9Y/OgRev8J52YAZBVbQrkoLAiI/QIDacAiL5K5vHQsCCdrZRhmtqkckP9xcTl3Q5Mn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755977075; c=relaxed/simple; bh=Zt4A++8ePieCzD1adnO3/ElWHgxxKJ54t2YBcerUXe0=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=GOa6SOCD9oCdObW/9RhG83jR3ynVuhSx7GBhRYddjoOJgqSmJ6aRFuHKq6Aj/XwT+dM0VJ5ZoA3kEff4VuJE2x+fmWsnauDE+vWqezUGUdBSa91Os++ZszNdmpq1Hpl09jVFUWugjC+CWyywVUclddbPn1qkjWPuzdZ55gtYk0o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 714733858C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755977075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=inneQDtNVwI6qVQWmVBAl4PAjjKV1NodeKjfCiaQ+XY=; b=bRicos7Z10UIrgSFdsa+8bPKzRFBUTGvjrrtQJx3iyWrlYrDS8H9pMkDB5GE2jECjRt0pf c9ajRHEl8tuE94/Jao7R4gzypUiD9n10iE5ER11ncCe0voJzTw5Y/ZlBUhx/IfECQUdCRf koL23sAeQ6jsu1zbgxYxL3nYJ6xmTSY= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-KUYFecL8Me2hl0ku_xOleg-1; Sat, 23 Aug 2025 15:24:31 -0400 X-MC-Unique: KUYFecL8Me2hl0ku_xOleg-1 X-Mimecast-MFC-AGG-ID: KUYFecL8Me2hl0ku_xOleg_1755977070 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B4C6E18003FD; Sat, 23 Aug 2025 19:24:30 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.88.17]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E15EC180029F; Sat, 23 Aug 2025 19:24:29 +0000 (UTC) Date: Sat, 23 Aug 2025 12:24:24 -0700 From: Kevin Buettner To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix gdb.base/gcorebg.exp and --program-prefix Message-ID: <20250823122424.536a8ae8@f41-zbm-amd> In-Reply-To: <20250822202335.874093-1-pedro@palves.net> References: <20250822202335.874093-1-pedro@palves.net> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sI3YqAnHocIq8dbOQLqRI8lvh8FbD8KYH4VP8ZaE-14_1755977070 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII 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 Fri, 22 Aug 2025 21:23:34 +0100 Pedro Alves wrote: > When GDB is configured with --program-prefix, we see: > > Running /home/pedro/gdb/src/gdb/testsuite/gdb.base/gcorebg.exp ... > FAIL: gdb.base/gcorebg.exp: detached=detached: Spawned gcore finished > FAIL: gdb.base/gcorebg.exp: detached=detached: Core file generated by > gcore FAIL: gdb.base/gcorebg.exp: detached=standard: Spawned gcore > finished FAIL: gdb.base/gcorebg.exp: detached=standard: Core file > generated by gcore > > The problem is here (with --program-prefix=prefix-), from gdb.log: > gcore: GDB binary > (/home/pedro/gdb/build-program-prefix/gdb/testsuite/../../gdb/prefix-gdb) > not found FAIL: gdb.base/gcorebg.exp: detached=detached: Spawned gcore > finished > > That is gcore (the script, not the GDB command) trying to run the > installed GDB: > > if [ ! -f "$binary_path/@GDB_TRANSFORM_NAME@" ]; then > echo "gcore: GDB binary (${binary_path}/@GDB_TRANSFORM_NAME@) not found" > exit 1 > fi > ... > "$binary_path/@GDB_TRANSFORM_NAME@" ... > > When running the testsuite with the just-built GDB, the GDB binary is > 'gdb', not @GDB_TRANSFORM_NAME@. > > Fix this by adding a new '-g gdb" option to the 'gcore' script, that > lets you override the GDB binary gcore runs, and then making > gdb.base/gcorebg.exp pass it to gcore. The GDB binary we're testing > is always in the $GDB global. This is similar to how it is already > possible to specify GDB's data directory with an option to gcore, and > then gdb.base/gcorebg.exp uses it. > > NEWS and documentation changes included. > > Change-Id: I6c60fba8768618eeba8d8d03b131dc756b57ee78 I approve the non-documentation portions. Approved-by: Kevin Buettner