aboutsummaryrefslogtreecommitdiff
path: root/gdb/contrib
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-05-04 10:11:53 +0200
committerTom de Vries <tdevries@suse.de>2019-05-04 10:11:53 +0200
commit9d6d4be89d12747a92629ed1bde1d423e2831de1 (patch)
tree654211517c36c66958063c8ca70e2fc74d93fe2d /gdb/contrib
parent27cdfa03b5be812683c18e64009a5da042190ae6 (diff)
downloadgdb-9d6d4be89d12747a92629ed1bde1d423e2831de1.zip
gdb-9d6d4be89d12747a92629ed1bde1d423e2831de1.tar.gz
gdb-9d6d4be89d12747a92629ed1bde1d423e2831de1.tar.bz2
[gdb/testsuite] Add cc-with-debug-names.exp
Add a target board that makes it easy to run the test suite with a .debug_names section added to executables. gdb/ChangeLog: 2019-05-04 Tom de Vries <tdevries@suse.de> * contrib/cc-with-tweaks.sh: Support -n arg. gdb/testsuite/ChangeLog: 2019-05-04 Tom de Vries <tdevries@suse.de> * boards/cc-with-debug-names.exp: New file.
Diffstat (limited to 'gdb/contrib')
-rwxr-xr-xgdb/contrib/cc-with-tweaks.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index 33c6322..47379cc 100755
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -42,7 +42,8 @@
# -Z invoke objcopy --compress-debug-sections
# -z compress using dwz
# -m compress using dwz -m
-# -i make an index
+# -i make an index (.gdb_index)
+# -n make a dwarf5 index (.debug_names)
# -p create .dwp files (Fission), you need to also use gcc option -gsplit-dwarf
# If nothing is given, no changes are made
@@ -77,6 +78,7 @@ next_is_output_file=no
output_file=a.out
want_index=false
+index_options=""
want_dwz=false
want_multi=false
want_dwp=false
@@ -87,6 +89,7 @@ while [ $# -gt 0 ]; do
-Z) want_objcopy_compress=true ;;
-z) want_dwz=true ;;
-i) want_index=true ;;
+ -n) want_index=true; index_options=-dwarf-5;;
-m) want_multi=true ;;
-p) want_dwp=true ;;
*) break ;;
@@ -170,7 +173,8 @@ if [ "$want_index" = true ]; then
# Filter out these messages which would stop dejagnu testcase run:
# echo "$myname: No index was created for $file" 1>&2
# echo "$myname: [Was there no debuginfo? Was there already an index?]" 1>&2
- GDB=$GDB $GDB_ADD_INDEX "$output_file" 2>&1|grep -v "^${GDB_ADD_INDEX##*/}: " >&2
+ GDB=$GDB $GDB_ADD_INDEX $index_options "$output_file" 2>&1 \
+ | grep -v "^${GDB_ADD_INDEX##*/}: " >&2
rc=${PIPESTATUS[0]}
[ $rc != 0 ] && exit $rc
fi