Added callstack procedure (useful for debugging)

r2221 | ffr | 2007-11-05 13:11:41 +1100 (Mon, 05 Nov 2007) | 2 lines
This commit is contained in:
Ferdi Franceschini
2007-11-05 13:11:41 +11:00
committed by Douglas Clowes
parent 27db513c0e
commit 9b6fb6ac77

View File

@@ -1,7 +1,7 @@
# Some useful functions for SICS configuration.
# $Revision: 1.9 $
# $Date: 2007-10-31 06:15:17 $
# $Revision: 1.10 $
# $Date: 2007-11-05 02:11:41 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by $Author: ffr $
@@ -14,7 +14,7 @@ proc getatt {sicsobj att} {
if [catch {
lindex [split [tolower_sicslist $sicsobj $att] =] 1
} reply ] {
return -code error $reply
return -code error "[info level 0]\n$reply"
} else {
return $reply
}
@@ -297,6 +297,16 @@ proc ::utility::get_portnum {port} {
}
}
##
# @brief Print callstack
proc ::utility::callstack {} {
uplevel {
for {set i 0} {$i > -[info level]} {incr i -1} {
clientput [info level $i]
}
}
}
namespace import ::utility::*;
Publish getinfo spy
Publish setpos user