[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: fix watcharray and watchvar procs
From: |
Ben Elliston |
Subject: |
PATCH: fix watcharray and watchvar procs |
Date: |
Mon, 22 May 2006 14:14:09 +1000 |
User-agent: |
Mutt/1.2.5.1i |
Tcl's trace command calls the named procedure with three arguments:
"When the trace triggers, three arguments are appended to command so
that the actual command is as follows:
command name1 name2 op"
watcharray and watchvar, for some reason, only took two parameters.
I've fixed these up. I'm reasonably certain this change is correct,
but wanted to post it for some post-commit checking by others. Thanks,
Ben
2006-05-22 Ben Elliston <address@hidden>
* lib/debugger.exp (watcharray): Add `array' parameter. Rename
`type' parameter to `op' and update all uses in the proc.
(watchvar): Add `ignore' parameter for scalar variables.
Likewise, rename `type' to `op' and update throughout the proc.
Index: debugger.exp
===================================================================
RCS file: /cvsroot/dejagnu/dejagnu/lib/debugger.exp,v
retrieving revision 1.12
diff -u -p -r1.12 debugger.exp
--- debugger.exp 22 May 2006 02:35:29 -0000 1.12
+++ debugger.exp 22 May 2006 03:54:36 -0000
@@ -80,18 +80,18 @@ proc dumpwatch { args } {
# Trap a watchpoint for an array.
#
-proc watcharray { element type} {
+proc watcharray { array element op } {
upvar [set array]($element) avar
- switch $type {
+ switch $op {
"w" { puts "New value of [set array]($element) is $avar" }
"r" { puts "[set array]($element) (= $avar) was just read" }
"u" { puts "[set array]($element) (= $avar) was just unset" }
}
}
-proc watchvar { v type } {
+proc watchvar { v ignored op } {
upvar $v var
- switch $type {
+ switch $op {
"w" { puts "New value of $v is $var" }
"r" { puts "$v (=$var) was just read" }
"u" { puts "$v (=$var) was just unset" }
pgpU6iV9VbOY_.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- PATCH: fix watcharray and watchvar procs,
Ben Elliston <=