📄 test.tcl
字号:
proc ShowMemProp {id} { global fp puts $fp " <---- properties ----" puts $fp " npiName=[npi_get $id -npiName]" puts $fp " npiFullName=[npi_get $id -npiFullName]" puts $fp " npiType=[npi_get $id -npiType]" puts $fp " npiFile=[npi_get $id -npiFile]" puts $fp " npiLineNo=[npi_get $id -npiLineNo]" puts $fp " npiSize=[npi_get $id -npiSize]" puts $fp " >---- properties ----"}proc ShowHandleProp {Handle type} { global fp puts $fp " <---$type --->" if {$Handle != "NULL"} { puts $fp " npiType = [npi_get $Handle -npiType]" puts $fp " npiName = [npi_get $Handle -npiName]" if {[npi_get $Handle -npiType] == "npiConstant"} { puts $fp " npiValue = [npi_get $Handle -npiValue]" } else { puts $fp " npiLineNo = [npi_get $Handle -npiLineNo]" } } puts $fp " <---end of $type --->"}proc ShowMemRelationship {id} { global fp puts $fp " <---relationship --->" set Scope [npi_handle $id -npiType npiScope] ShowHandleProp $Scope "npi_handle \$id -npiType npiScope" set Left [npi_handle $id -npiType npiLeftRange] ShowHandleProp $Left "npi_handle \$id -npiType npiLeftRange" set Right [npi_handle $id -npiType npiRightRange] ShowHandleProp $Right "npi_handle \$id -npiType npiRightRange" set Left_Dim [npi_handle $id -npiType npiLeftRange -Dimention] ShowHandleProp $Left_Dim "npi_handle \$id -npiType npiLeftRange -Dimention" set Right_Dim [npi_handle $id -npiType npiRightRange -Dimention] ShowHandleProp $Right_Dim "npi_handle \$id -npiType npiRightRange -Dimention" puts $fp " <---end of relationship --->"}proc ShowMemPropAndRelationship {} { global g_Memory global fp set var $g_Memory puts $fp "<---begin showing Memory information--->" ShowMemProp $var ShowMemRelationship $var puts $fp "<---end of showing Memory information--->"} set log_file [file join [file dirname [info script]] [file tail [info script]].out]set fp [open $log_file w]fconfigure $fp -buffering nonenpi_register_cb -npiModuleBased Memory ShowMemPropAndRelationshipnpi_traverse_model -npiModuleBasedclose $fp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -