aboutsummaryrefslogtreecommitdiff
path: root/gdb/contrib
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-24 00:30:24 +0000
committerDoug Evans <dje@google.com>2013-05-24 00:30:24 +0000
commit20d7f21139402ac86575fc271dcf07f085468ac8 (patch)
treeca4012e8fd1c7db81c7da675d147757c132955dc /gdb/contrib
parenta8dcd388143a928b2ba779377ae173a4fd1facd3 (diff)
* contrib/cc-with-tweaks.sh (-p): Handle no dwo files.
Diffstat (limited to 'gdb/contrib')
-rwxr-xr-xgdb/contrib/cc-with-tweaks.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index c03d87f470..dbab92a309 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"