diff options
-rwxr-xr-x | gdb/contrib/cc-with-tweaks.sh | 5 | ||||
-rw-r--r-- | gdb/testsuite/boards/cc-with-dwz-5.exp | 28 |
2 files changed, 32 insertions, 1 deletions
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh index de56018..930ba5c 100755 --- a/gdb/contrib/cc-with-tweaks.sh +++ b/gdb/contrib/cc-with-tweaks.sh @@ -42,6 +42,7 @@ # -Z invoke objcopy --compress-debug-sections # -z compress using dwz # -m compress using dwz -m +# -5 compress using dwz -m -5 # -i make an index (.gdb_index) # -c make an index (currently .gdb_index) in a cache dir # -n make a dwarf5 index (.debug_names) @@ -88,6 +89,7 @@ want_index=false index_options="" want_index_cache=false want_dwz=false +dwz_5flag= want_multi=false want_dwp=false want_objcopy_compress=false @@ -101,6 +103,7 @@ while [ $# -gt 0 ]; do -n) want_index=true; index_options=-dwarf-5;; -c) want_index_cache=true ;; -m) want_multi=true ;; + -5) want_multi=true; dwz_5flag=-5 ;; -p) want_dwp=true ;; -l) want_gnu_debuglink=true ;; *) break ;; @@ -269,7 +272,7 @@ elif [ "$want_multi" = true ]; then rm -f "$dwz_file" cp "$output_file" "${output_file}.alt" - $DWZ -m "$dwz_file" "$output_file" "${output_file}.alt" > /dev/null + $DWZ $dwz_5flag -m "$dwz_file" "$output_file" "${output_file}.alt" > /dev/null rm -f "${output_file}.alt" # Validate dwz's work by checking if the expected output file exists. diff --git a/gdb/testsuite/boards/cc-with-dwz-5.exp b/gdb/testsuite/boards/cc-with-dwz-5.exp new file mode 100644 index 0000000..b254f91 --- /dev/null +++ b/gdb/testsuite/boards/cc-with-dwz-5.exp @@ -0,0 +1,28 @@ +# Copyright 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# This file is a dejagnu "board file" and is used to run the testsuite +# with contrib/cc-with-tweaks.sh -5. +# +# NOTE: We assume dwz is in $PATH. +# +# Example usage: +# bash$ cd $objdir +# bash$ make check-gdb \ +# RUNTESTFLAGS='--target_board=cc-with-dwz-5' +# + +set CC_WITH_TWEAKS_FLAGS "-5" +load_board_description "cc-with-tweaks" |