aboutsummaryrefslogtreecommitdiff
path: root/gdb/contrib
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2018-07-07 23:02:36 +0200
committerJan Kratochvil <jan.kratochvil@redhat.com>2018-07-07 23:02:36 +0200
commit25289ac1670fb164770b0753116b1e909beed4cb (patch)
tree273f9132755ab9b9fb1ee85c3e828ca71074a60b /gdb/contrib
parente83f4d97504515f8c5f290eeb25eac87cca6892f (diff)
downloadgdb-25289ac1670fb164770b0753116b1e909beed4cb.zip
gdb-25289ac1670fb164770b0753116b1e909beed4cb.tar.gz
gdb-25289ac1670fb164770b0753116b1e909beed4cb.tar.bz2
contrib/gdb-add-index.sh -dwarf-5
------------------------------------------------------------------------------ (gdb) help save gdb-index Save a gdb-index file. Usage: save gdb-index [-dwarf-5] DIRECTORY No options create one file with .gdb-index extension for pre-DWARF-5 compatible .gdb_index section. With -dwarf-5 creates two files with extension .debug_names and .debug_str for DWARF-5 .debug_names section. ------------------------------------------------------------------------------ But gdb-add-index command provided no way how to pass the -dwarf-5 option. gdb/ChangeLog 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com> * contrib/gdb-add-index.sh ($dwarf5): New, use it.
Diffstat (limited to 'gdb/contrib')
-rwxr-xr-xgdb/contrib/gdb-add-index.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
index 7114696..8e260d7 100755
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -23,8 +23,14 @@ OBJCOPY=${OBJCOPY:=objcopy}
myname="${0##*/}"
+dwarf5=""
+if [ "$1" = "-dwarf-5" ]; then
+ dwarf5="$1"
+ shift
+fi
+
if test $# != 1; then
- echo "usage: $myname FILE" 1>&2
+ echo "usage: $myname [-dwarf-5] FILE" 1>&2
exit 1
fi
@@ -48,7 +54,7 @@ rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr
trap "rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr" 0
$GDB --batch -nx -iex 'set auto-load no' \
- -ex "file $file" -ex "save gdb-index $dir" || {
+ -ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
# Just in case.
status=$?
echo "$myname: gdb error generating index for $file" 1>&2