public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name
@ 2013-11-01  0:31 Maciej W. Rozycki
  2013-11-01 15:37 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2013-11-01  0:31 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name
  2013-11-01  0:31 [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name Maciej W. Rozycki
@ 2013-11-01 15:37 ` Tom Tromey
  2013-11-01 23:40   ` Maciej W. Rozycki
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2013-11-01 15:37 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches

>>>>> "Maciej" == Maciej W Rozycki <macro@codesourcery.com> writes:

Maciej> 2013-11-01  Maciej W. Rozycki  <macro@codesourcery.com>

Maciej> 	gdb/testsuite/
Maciej> 	* gdb.dwarf2/dwzbuildid.exp: Rename `outdir' variable to 
Maciej> 	`debugdir'.

Ok.
I wonder whether we should mention it in banned_variables.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name
  2013-11-01 15:37 ` Tom Tromey
@ 2013-11-01 23:40   ` Maciej W. Rozycki
  2013-11-04 16:01     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2013-11-01 23:40 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On Fri, 1 Nov 2013, Tom Tromey wrote:

> Maciej> 	gdb/testsuite/
> Maciej> 	* gdb.dwarf2/dwzbuildid.exp: Rename `outdir' variable to 
> Maciej> 	`debugdir'.
> 
> Ok.

 Thanks for your review, I have applied the change now.

> I wonder whether we should mention it in banned_variables.

 Hmm, would it make sense to grep lib/*.exp for global variable references 
and see if there are any other candidates?

  Maciej

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name
  2013-11-01 23:40   ` Maciej W. Rozycki
@ 2013-11-04 16:01     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2013-11-04 16:01 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches

Tom> I wonder whether we should mention it in banned_variables.

Maciej>  Hmm, would it make sense to grep lib/*.exp for global variable
Maciej> references and see if there are any other candidates?

It couldn't hurt.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-04 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01  0:31 [PATCH] gdb.dwarf2/dwzbuildid.exp: Avoid reserved variable name Maciej W. Rozycki
2013-11-01 15:37 ` Tom Tromey
2013-11-01 23:40   ` Maciej W. Rozycki
2013-11-04 16:01     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).