Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: gdb/cc-with-dwz.sh

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/c-valprint.c ('k') | gdb/cc-with-index.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/cc-with-dwz.sh
diff --git a/gdb/cc-with-index.sh b/gdb/cc-with-dwz.sh
old mode 100644
new mode 100755
similarity index 53%
copy from gdb/cc-with-index.sh
copy to gdb/cc-with-dwz.sh
index 22eefaacbff339ed4f8006322fba321a7acf9db8..f66deb1d9d4156c12f7e9a2c8b94782a569c9808
--- a/gdb/cc-with-index.sh
+++ b/gdb/cc-with-dwz.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Wrapper around gcc to add the .gdb_index section when running the testsuite.
+# Wrapper around gcc to run 'dwz' when running the testsuite.
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -15,41 +15,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This program requires gdb and objcopy in addition to gcc.
-# The default values are gdb from the build tree and objcopy from $PATH.
-# They may be overridden by setting environment variables GDB and OBJCOPY
-# respectively.
-# We assume the current directory is either $obj/gdb or $obj/gdb/testsuite.
+# This program requires dwz in addition to gcc.
#
# Example usage:
#
# bash$ cd $objdir/gdb/testsuite
# bash$ runtest \
-# CC_FOR_TARGET="/bin/sh $srcdir/cc-with-index.sh gcc" \
-# CXX_FOR_TARGET="/bin/sh $srcdir/cc-with-index.sh g++"
+# CC_FOR_TARGET="/bin/sh $srcdir/cc-with-dwz.sh gcc" \
+# CXX_FOR_TARGET="/bin/sh $srcdir/cc-with-dwz.sh g++"
#
-# For documentation on index files: info -f gdb.info -n "Index Files"
-myname=cc-with-index.sh
+myname=cc-with-dwz.sh
-if [ -z "$GDB" ]
-then
- if [ -f ./gdb ]
- then
- GDB="./gdb"
- elif [ -f ../gdb ]
- then
- GDB="../gdb"
- elif [ -f ../../gdb ]
- then
- GDB="../../gdb"
- else
- echo "$myname: unable to find usable gdb" >&2
- exit 1
- fi
-fi
-
-OBJCOPY=${OBJCOPY:-objcopy}
+DWZ=${DWZ:-dwz}
have_link=unknown
next_is_output_file=no
@@ -88,16 +66,6 @@ then
exit $?
fi
-index_file="${output_file}.gdb-index"
-if [ -f "$index_file" ]
-then
- echo "$myname: Index file $index_file exists, won't clobber." >&2
- exit 1
-fi
-
-output_dir="${output_file%/*}"
-[ "$output_dir" = "$output_file" ] && output_dir="."
-
"$@"
rc=$?
[ $rc != 0 ] && exit $rc
@@ -107,20 +75,6 @@ then
exit 1
fi
-$GDB --batch-silent -nx -ex "file $output_file" -ex "save gdb-index $output_dir"
-rc=$?
-[ $rc != 0 ] && exit $rc
-
-# GDB might not always create an index. Cope.
-if [ -f "$index_file" ]
-then
- $OBJCOPY --add-section .gdb_index="$index_file" \
- --set-section-flags .gdb_index=readonly \
- "$output_file" "$output_file"
- rc=$?
-else
- rc=0
-fi
+$DWZ "$output_file" > /dev/null 2>&1
-rm -f "$index_file"
-exit $rc
+exit 0
« no previous file with comments | « gdb/c-valprint.c ('k') | gdb/cc-with-index.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698