public inbox for
help / color / mirror / Atom feed
From: Tom de Vries <>
Subject: [binutils-gdb] [gdb/contrib] Handle STRIP_ARGS_{STRIP,KEEP}_DEBUG in
Date: Fri, 14 Oct 2022 19:23:16 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=fb799bba55aea6b769584bf6b17d7040343024e7

commit fb799bba55aea6b769584bf6b17d7040343024e7
Author: Tom de Vries <>
Date:   Fri Oct 14 21:22:57 2022 +0200

    [gdb/contrib] Handle STRIP_ARGS_{STRIP,KEEP}_DEBUG in
    Handle new environment variable STRIP_ARGS_STRIP_DEBUG, defaulting to
    --strip-debug in gdb/contrib/, such that we can easily
    reproduce the PR29277 assert using:
    $ export STRIP_ARGS_STRIP_DEBUG=--strip-all
    $ make check RUNTESTFLAGS="gdb.base/jit-reader.exp \
        --target_board cc-with-gnu-debuglink"
    For completeness sake and to avoid confusion about which of the two used strip
    invocations the passed args apply to, likewise add STRIP_ARGS_KEEP_DEBUG,
    defaulting to --only-keep-debug.
    Script checked with shellcheck, no new warnings added.
    Tested on x86_64-linux.

 gdb/contrib/ | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/contrib/ b/gdb/contrib/
index c6f0f62cd06..0ad0091d47a 100755
--- a/gdb/contrib/
+++ b/gdb/contrib/
@@ -74,6 +74,11 @@ READELF=${READELF:-readelf}
+# shellcheck disable=SC2206 # Allow word splitting.
+# shellcheck disable=SC2206 # Allow word splitting.
@@ -267,11 +272,11 @@ if [ "$want_gnu_debuglink" = true ]; then
     debug_file="$tmpdir"/$(basename "$output_file").debug
     # Create stripped and debug versions of output_file.
-    strip --strip-debug "${output_file}" \
+    strip "${STRIP_ARGS_STRIP_DEBUG[@]}" "${output_file}" \
 	  -o "${stripped_file}"
     [ $rc != 0 ] && exit $rc
-    strip --only-keep-debug "${output_file}" \
+    strip "${STRIP_ARGS_KEEP_DEBUG[@]}" "${output_file}" \
 	  -o "${debug_file}"
     [ $rc != 0 ] && exit $rc

                 reply	other threads:[~2022-10-14 19:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \

* 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).