From: Doug Evans Date: Fri, 24 May 2013 00:30:24 +0000 (+0000) Subject: * contrib/cc-with-tweaks.sh (-p): Handle no dwo files. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20d7f21139402ac86575fc271dcf07f085468ac8;p=binutils-gdb.git * contrib/cc-with-tweaks.sh (-p): Handle no dwo files. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index db214731846..1ee7462610f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-05-23 Doug Evans + + * contrib/cc-with-tweaks.sh (-p): Handle no dwo files. + 2013-05-23 Pedro Alves * common/filestuff.c [USE_WIN32API]: Define HAVE_SOCKETS. diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh index c03d87f4707..dbab92a3098 100755 --- a/gdb/contrib/cc-with-tweaks.sh +++ b/gdb/contrib/cc-with-tweaks.sh @@ -179,10 +179,13 @@ fi if [ "$want_dwp" = true ]; then dwo_files=$($READELF -wi "${output_file}" | grep _dwo_name | \ sed -e 's/^.*: //' | sort | uniq) - $DWP -o "${output_file}.dwp" ${dwo_files} > /dev/null - rc=$? - [ $rc != 0 ] && exit $rc - rm -f ${dwo_files} + rc=0 + if [ -n "$dwo_files" ]; then + $DWP -o "${output_file}.dwp" ${dwo_files} > /dev/null + rc=$? + [ $rc != 0 ] && exit $rc + rm -f ${dwo_files} + fi fi rm -f "$index_file"