From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] [gdb] Handle AWK=gawk in gstack
Date: Thu, 17 Sep 2026 15:06:37 +0200 [thread overview]
Message-ID: <20260917130637.3224975-3-tdevries@suse.de> (raw)
In-Reply-To: <20260917130637.3224975-1-tdevries@suse.de>
When running test-case gdb.base/gstack.exp on msys2-ucrt64, I run into:
...
PASS: $exp: spawn gstack
gstack: could not find usable awk interpreter
GSTACK-END
PASS: $exp: gstack exits with no error
PASS: $exp: gstack's exit status is 0
UNSUPPORTED: gdb.base/gstack.exp: no awk interpreter found
...
The failure can be reproducing on the command line:
...
$ AWK=gawk gstack
gstack: could not find usable awk interpreter
...
Fix this in gstack using:
...
AWK=$(command -v "$AWK")
...
---
gdb/gstack-1.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/gstack-1.in b/gdb/gstack-1.in
index 9079e70a746..46fa9429d86 100755
--- a/gdb/gstack-1.in
+++ b/gdb/gstack-1.in
@@ -34,6 +34,8 @@ if [ -z "$AWK" ]; then
test -n "$awk_prog" && break
done
AWK="$awk_prog"
+else
+ AWK=$(command -v "$AWK")
fi
if [ ! -x "$AWK" ]; then
echo "$0: could not find usable awk interpreter" 1>&2
--
2.51.0
prev parent reply other threads:[~2026-09-17 13:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 13:06 [PATCH 0/2] [gdb] Two fixes for gdb.base/gstack.exp on msys2-ucrt64 Tom de Vries
2026-09-17 13:06 ` [PATCH 1/2] [gdb/testsuite] Fix timeout in gdb.base/gstack.exp Tom de Vries
2026-09-17 13:06 ` Tom de Vries [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=20260917130637.3224975-3-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/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