From: Keith Seitz Date: Mon, 7 Apr 2025 15:40:56 +0000 (-0700) Subject: gstack: [downstream regression] Output file names and line numbers X-Git-Tag: gdb-16.3-release~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7abbebc6d6043e54fdfeae36a59236335beab63;p=thirdparty%2Fbinutils-gdb.git gstack: [downstream regression] Output file names and line numbers With commit fb2ded33c1e519659743047ed7817166545b6d91, I added Fedora's gstack script to gdb. Some issues have arisen since then, and this patch addresses those issues: . As Sam James recently noted[1], PKGVERSION and VERSION need to be quoted. . A Fedora user reported the misuse of --readnever, which causes gstack to omit filename and line number information in the backtrace[Red Hat BZ 2354997]. [1] https://inbox.sourceware.org/gdb-patches/d19d6bc17e0a160ce27fc572079f11a587c0e168.1742424869.git.sam@gentoo.org/ Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2354997 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32828 --- diff --git a/gdb/gstack-1.in b/gdb/gstack-1.in index 5e413290c9a..25339d9877d 100755 --- a/gdb/gstack-1.in +++ b/gdb/gstack-1.in @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (C) 2024 Free Software Foundation, Inc. +# Copyright (C) 2024-2025 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 @@ -22,8 +22,8 @@ GDB=${GDB:-$(command -v gdb)} GDBARGS=${GDBARGS:-} AWK=${AWK:-} -PKGVERSION=@PKGVERSION@ -VERSION=@VERSION@ +PKGVERSION="@PKGVERSION@" +VERSION="@VERSION@" # Find an appropriate awk interpreter if one was not specified # via the environment. @@ -132,7 +132,7 @@ EOF ) # Run GDB and remove some unwanted noise. -"$GDB" --quiet -nx --readnever $GDBARGS <