public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC] Unset tcl variable addr to avoid clashing
@ 2015-04-10 11:51 Yao Qi
  2015-04-10 16:53 ` Doug Evans
  2015-04-11 17:03 ` Sergio Durigan Junior
  0 siblings, 2 replies; 10+ messages in thread
From: Yao Qi @ 2015-04-10 11:51 UTC (permalink / raw)
  To: gdb-patches

From: Yao Qi <yao.qi@linaro.org>

Hi,
I see some tcl ERRORs in gdb.sum recently:

ERROR: tcl error sourcing ../../../../../binutils-gdb/gdb/testsuite/gdb.base/dmsym.exp.
ERROR: can't set "addr": variable is array
    while executing
"set addr "0x\[0-9a-zA-Z\]+""
    (file "../../../../../binutils-gdb/gdb/testsuite/gdb.base/dmsym.exp" line 45)
    invoked from within
"source ../../../../../binutils-gdb/gdb/testsuite/gdb.base/dmsym.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source ../../../../../binutils-gdb/gdb/testsuite/gdb.base/dmsym.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""

It is OK to run single dmsym.exp.  This error is caused by the name
clashing with coredump-filter.exp, and it can be reproduced,

 $ make check RUNTESTFLAGS='coredump-filter.exp dmsym.exp exception.exp stepi-random-signal.exp'

as variable addr is used in all of them.  This patch is to unset array
addr, but manually unset variables isn't good to me.  Is there any
approaches we can do to avoid name clashing?

gdb/testsuite:

2015-04-10  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/coredump-filter.exp: Unset addr.
---
 gdb/testsuite/gdb.base/coredump-filter.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp
index f3203be..2deb7b3 100644
--- a/gdb/testsuite/gdb.base/coredump-filter.exp
+++ b/gdb/testsuite/gdb.base/coredump-filter.exp
@@ -196,3 +196,5 @@ foreach item $all_anon_corefiles {
 with_test_prefix "loading and testing corefile for non-Private-Shared-Anon-File" {
     test_disasm $non_private_shared_anon_file_core $main_addr 1
 }
+
+unset addr
-- 
1.9.1

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

end of thread, other threads:[~2015-04-26 19:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 11:51 [RFC] Unset tcl variable addr to avoid clashing Yao Qi
2015-04-10 16:53 ` Doug Evans
2015-04-10 17:55   ` Keith Seitz
2015-04-10 18:08     ` Doug Evans
2015-04-11 17:03 ` Sergio Durigan Junior
2015-04-12 17:22   ` Doug Evans
2015-04-13  6:47     ` Sergio Durigan Junior
2015-04-13  8:26     ` Pedro Alves
2015-04-14 19:12       ` Sergio Durigan Junior
2015-04-26 19:44         ` Sergio Durigan Junior

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).