[gdb/contrib] Handle STRIP_ARGS_{STRIP,KEEP}_DEBUG in cc-with-tweaks.sh
authorTom de Vries <tdevries@suse.de>
Fri, 14 Oct 2022 19:22:57 +0000 (21:22 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 14 Oct 2022 19:22:57 +0000 (21:22 +0200)
commitfb799bba55aea6b769584bf6b17d7040343024e7
treede4ef22d544c628057b0d164d6a7aca1d72ee92b
parent8e94bb3e3a478544c0d8abfad8404af015f7130b
[gdb/contrib] Handle STRIP_ARGS_{STRIP,KEEP}_DEBUG in cc-with-tweaks.sh

Handle new environment variable STRIP_ARGS_STRIP_DEBUG, defaulting to
--strip-debug in gdb/contrib/cc-with-tweaks.sh, 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/cc-with-tweaks.sh