Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix gdb.base/gcorebg.exp and --program-prefix
Date: Sat, 23 Aug 2025 12:24:24 -0700	[thread overview]
Message-ID: <20250823122424.536a8ae8@f41-zbm-amd> (raw)
In-Reply-To: <20250822202335.874093-1-pedro@palves.net>

On Fri, 22 Aug 2025 21:23:34 +0100
Pedro Alves <pedro@palves.net> 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@" </dev/null \
> ...
> 
> 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 <kevinb@redhat.com>


      reply	other threads:[~2025-08-23 19:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 20:23 Pedro Alves
2025-08-23 19:24 ` Kevin Buettner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250823122424.536a8ae8@f41-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox