This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Handle no dwo files for cc-with-tweaks.sh -p.
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 23 May 2013 17:31:59 -0700
- Subject: [commit] Handle no dwo files for cc-with-tweaks.sh -p.
Hi.
Some tests don't have any debug info, and thus no dwo files.
This patch updates cc-with-tweaks.sh to handle this.
Committed.
2013-05-23 Doug Evans <dje@google.com>
* contrib/cc-with-tweaks.sh (-p): Handle no dwo files.
diff -u -p -r1.9 cc-with-tweaks.sh
--- contrib/cc-with-tweaks.sh 25 Mar 2013 22:53:54 -0000 1.9
+++ contrib/cc-with-tweaks.sh 24 May 2013 00:28:02 -0000
@@ -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"