This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Fri, 1 Nov 2013 00:30:50 +0000
- Subject: [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name
- Authentication-results: sourceware.org; auth=none
Hi,
The reuse of `outdir' as the variable name in gdb.dwarf2/dwzbuildid.exp
causes all later output intended for `gdb.log' not to make its way there.
The variable already has a meaning defined in lib/gdb.exp. The change
below removes the problem for me; tested with the mips-linux-gnu target.
OK to apply?
2013-11-01 Maciej W. Rozycki <macro@codesourcery.com>
gdb/testsuite/
* gdb.dwarf2/dwzbuildid.exp: Rename `outdir' variable to
`debugdir'.
Maciej
gdb-test-dwarf2-dwzbuildid.diff
Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp 2013-10-26 20:22:55.000000000 +0100
+++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp 2013-11-01 00:14:20.467793304 +0000
@@ -100,8 +100,8 @@ set ok_buildid ${ok_prefix}${ok_suffix}
set ok_buildid2 ${ok_prefix}${ok_suffix2}
set bad_buildid ffffffffffff
-set outdir [standard_output_file {}]
-set basedir $outdir/.build-id
+set debugdir [standard_output_file {}]
+set basedir $debugdir/.build-id
file mkdir $basedir $basedir/$ok_prefix
# Test where the separate debuginfo's buildid matches.
@@ -154,7 +154,7 @@ foreach testname {ok mismatch fallback}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_test_no_output "set debug-file-directory $outdir" \
+ gdb_test_no_output "set debug-file-directory $debugdir" \
"set debug-file-directory"
gdb_load ${binfile}-${testname}