Skip to content

Commit dbc864a

Browse files
committed
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 <[email protected]> * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1 parent 3775c57 commit dbc864a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

gdb/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2018-07-07 Jan Kratochvil <[email protected]>
2+
3+
* contrib/gdb-add-index.sh ($dwarf5): New, use it.
4+
15
2018-07-04 Joel Brobecker <[email protected]>
26

37
* version.in: Set GDB version number to 8.1.90.DATE-git.

gdb/contrib/gdb-add-index.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ OBJCOPY=${OBJCOPY:=objcopy}
2323

2424
myname="${0##*/}"
2525

26+
dwarf5=""
27+
if [ "$1" = "-dwarf-5" ]; then
28+
dwarf5="$1"
29+
shift
30+
fi
31+
2632
if test $# != 1; then
27-
echo "usage: $myname FILE" 1>&2
33+
echo "usage: $myname [-dwarf-5] FILE" 1>&2
2834
exit 1
2935
fi
3036

@@ -48,7 +54,7 @@ rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr
4854
trap "rm -f $index4 $index5 $debugstr $debugstrmerge $debugstrerr" 0
4955

5056
$GDB --batch -nx -iex 'set auto-load no' \
51-
-ex "file $file" -ex "save gdb-index $dir" || {
57+
-ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
5258
# Just in case.
5359
status=$?
5460
echo "$myname: gdb error generating index for $file" 1>&2

0 commit comments

Comments
 (0)