Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA/testsuite: Fix `array unset' goof
@ 2002-04-15 14:40 Daniel Jacobowitz
  2002-04-16  8:13 ` Fernando Nasser
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-04-15 14:40 UTC (permalink / raw)
  To: gdb-patches, fnasser

I fixed linux-dp.exp to use 'array unset seen' instead of
'array set seen {}' (which doesn't do anything if seen already exists). 
Unfortunately, array unset only appeared in Tcl 8.2.3.  If you use DejaGNU
with system expect/tcl, you're likely to get an older version.  This uses
'array set seen {}' followed by 'unset seen', which should work in any Tcl
version.

OK?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2002-04-15  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.threads/linux-dp.exp: Use 'unset' instead of 'array unset'.

Index: gdb.threads/linux-dp.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/linux-dp.exp,v
retrieving revision 1.6
diff -u -p -r1.6 linux-dp.exp
--- gdb.threads/linux-dp.exp	31 Jan 2002 05:08:41 -0000	1.6
+++ gdb.threads/linux-dp.exp	15 Apr 2002 21:37:19 -0000
@@ -214,7 +214,8 @@ proc check_philosopher_stack {thread see
 }
 
 set any_interesting 0
-array unset seen
+array set seen {}
+unset seen
 for {set i 1} {$i <= 7} {incr i} {
     if [check_philosopher_stack $i seen] {
 	set any_interesting 1


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

* Re: RFA/testsuite: Fix `array unset' goof
  2002-04-15 14:40 RFA/testsuite: Fix `array unset' goof Daniel Jacobowitz
@ 2002-04-16  8:13 ` Fernando Nasser
  2002-04-24 15:11   ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Fernando Nasser @ 2002-04-16  8:13 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz wrote:
> 
> I fixed linux-dp.exp to use 'array unset seen' instead of
> 'array set seen {}' (which doesn't do anything if seen already exists).
> Unfortunately, array unset only appeared in Tcl 8.2.3.  If you use DejaGNU
> with system expect/tcl, you're likely to get an older version.  This uses
> 'array set seen {}' followed by 'unset seen', which should work in any Tcl
> version.
> 
> OK?
> 

Please go ahead.

Regards,
Fernando


> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
> 
> 2002-04-15  Daniel Jacobowitz  <drow@mvista.com>
> 
>         * gdb.threads/linux-dp.exp: Use 'unset' instead of 'array unset'.
> 
> Index: gdb.threads/linux-dp.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/linux-dp.exp,v
> retrieving revision 1.6
> diff -u -p -r1.6 linux-dp.exp
> --- gdb.threads/linux-dp.exp    31 Jan 2002 05:08:41 -0000      1.6
> +++ gdb.threads/linux-dp.exp    15 Apr 2002 21:37:19 -0000
> @@ -214,7 +214,8 @@ proc check_philosopher_stack {thread see
>  }
> 
>  set any_interesting 0
> -array unset seen
> +array set seen {}
> +unset seen
>  for {set i 1} {$i <= 7} {incr i} {
>      if [check_philosopher_stack $i seen] {
>         set any_interesting 1

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

* Re: RFA/testsuite: Fix `array unset' goof
  2002-04-16  8:13 ` Fernando Nasser
@ 2002-04-24 15:11   ` Daniel Jacobowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-04-24 15:11 UTC (permalink / raw)
  To: gdb-patches

On Tue, Apr 16, 2002 at 11:10:33AM -0400, Fernando Nasser wrote:
> Daniel Jacobowitz wrote:
> > 
> > I fixed linux-dp.exp to use 'array unset seen' instead of
> > 'array set seen {}' (which doesn't do anything if seen already exists).
> > Unfortunately, array unset only appeared in Tcl 8.2.3.  If you use DejaGNU
> > with system expect/tcl, you're likely to get an older version.  This uses
> > 'array set seen {}' followed by 'unset seen', which should work in any Tcl
> > version.
> > 
> > OK?
> > 
> 
> Please go ahead.

Committed, thanks.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

end of thread, other threads:[~2002-04-24 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-15 14:40 RFA/testsuite: Fix `array unset' goof Daniel Jacobowitz
2002-04-16  8:13 ` Fernando Nasser
2002-04-24 15:11   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox