www.pudn.com > vxWorks_Lab.rar > crosswind.tcl


# crosswind.tcl - user extensions to CrossWind 
 
# Create toolbar button for setting global task breakpoint. No drop binding. 
 
toolBarItemCreate gbreak button {actOnSelection gbreak} \ 
	"dragReturnString gbreak"  
 
 
############################################################################## 
# 
# sourceGBkptSet - set a global task breakpoint 
# 
# This routine sets a global task  breakpoint at location where the "gbreak" 
# symbol has been put. 
# 
# SYNOPSIS: 
#   sourceGBkptSet args 
# 
# PARAMETERS: 
#   args: 
# 
# RETURNS: N/A 
# 
# ERRORS: N/A 
# 
 
proc sourceGBkptSet {args} { 
    cwDownTcl -noresult gdb gbreak [formGdbAddress $args] 
} 
 
############################################################################## 
# Replacement version of sourceDrop with support for gbreak button 
############################################################################## 
# 
# sourceDrop - control of Source Widget. 
# 
# This routine controls the Source Widget drop behavior 
# 
# SYNOPSIS: 
#   sourceDrop args 
# 
# PARAMETERS: 
#   args: one of "break", "tbreak", "cont", "here", "editor" or "#event". 
# 
# RETURNS: N/A 
# 
# ERRORS: N/A 
# 
 
proc sourceDrop {args} { 
 
    set aspec [lrange $args 1 end] 
 
    case [lindex $args 0] {  
 
	"break"		{sourceBkptSet $aspec} 
	"tbreak"	{sourceTBkptSet $aspec} 
	"gbreak"	{sourceGBkptSet $aspec} 
	"cont"		{sourceUntilSet $aspec} 
	"here"		{sourceUntilSet $aspec} 
	"editor"	{sourceEdit $aspec} 
 
	"#event"	{sourceWvEvent $aspec} 
    } 
}