standard.tcl
来自「一个用在mips体系结构中的操作系统」· TCL 代码 · 共 138 行
TCL
138 行
## Copyright (C) 1996-1998 by the Board of Trustees# of Leland Stanford Junior University.# # This file is part of the SimOS distribution. # See LICENSE file for terms of the license. ########### You can pick the amount of detail info to collect by setting the##### detailLevel variable before you source standard.tcl. The following##### levels are supported.########## 0 - no annotations set, translate virtual not done##### 1 - minimal annotations for process tracking, user anns and bdoor,##### translate virtual done##### 2 - level 1 plus modes support for summary and doProfile##### 3 - level 2 plus kernel stats##### 4 - level 3 plus sync stats########## detailLevel defaults to 2#####if ![info exists detailLevel] { set detailLevel 2}FileSourced standard.tclconsole "@@@@ standard.tcl: detailLevel=$detailLevel \n"console "@@@@ TargetOS = $SIMOS(TargetOS)\n" if {($SIMOS(TargetOS) == "IRIX5.3") || ($SIMOS(TargetOS) == "IRIX6.2") || ($SIMOS(TargetOS) == "IRIX6.4") } { set newPath $simosPath/irix lappend simosPath $newPath}if {$SIMOS(ISA) == "ALPHA"} { symbol load vmunix $PARAM(ALPHA.Files.Kernel) source tlaser.tcl}###### translate_virtual.tcl###### walks kernel symbol tables to translate faulting address from tcl ### kernel must be loaded into symbols### exports u variable to be used in symbol exprs### exports private variable to be used in symbol exprs### exports K0BASE constant### exports K2BASE constant###if {$detailLevel >= 1} { source "translate_virtual.tcl"}###### os.tcl###### raises the simulators knowledge to the OS level### kernel must be loaded into symbols### exports osEvent annotation type### exports PID variable per cpu ### exports PROCESS variable per cpu ### exports inUserMode proc###if {$detailLevel >= 1} { source "os.tcl"}###### user_anns.tcl###### allows annotations to be set on user virtual addresses### exports registerUserAnns proc###if {$detailLevel >= 1} { source "user_anns.tcl"}###### bdoor.tcl###### allows you to run arbitrary tcl from the simulated OS command line###if {$detailLevel >= 1} { source "bdoor.tcl"}###### modes.tcl###### basic modes breakdown###if {$detailLevel >= 2} { source "modes.tcl"}###### kernel_stats.tcl###if {$detailLevel >= 3} { source "kernel_stats.tcl"}###### sync_stats.tcl###if {$detailLevel >= 4} { if {$PARAM(CPU.Count) >= 2} { source "sync_stats.tcl" }}###### Override Tcl's exit routine with ours so stats come out.###if {![info exists noExitOverride]} { proc exit { } { simosExit }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?