* contrib/cc-with-tweaks.sh (-p): Handle no dwo files.
authorDoug Evans <dje@google.com>
Fri, 24 May 2013 00:30:24 +0000 (00:30 +0000)
committerDoug Evans <dje@google.com>
Fri, 24 May 2013 00:30:24 +0000 (00:30 +0000)
gdb/ChangeLog
gdb/contrib/cc-with-tweaks.sh

index db21473184665876ed70f3f68e33192c51fa0805..1ee7462610f18e1a2f421611a5cfecb8c69c96d8 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-23  Doug Evans  <dje@google.com>
+
+       * contrib/cc-with-tweaks.sh (-p): Handle no dwo files.
+
 2013-05-23  Pedro Alves  <palves@redhat.com>
 
        * common/filestuff.c [USE_WIN32API]: Define HAVE_SOCKETS.
index c03d87f4707add464801409f59c5828b082fa1b7..dbab92a3098def855621c60e074fb4b240b4c60b 100755 (executable)
@@ -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"