summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/library
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>2002-10-15 21:19:51 +0000
committerMartin Hunt <hunt@redhat.com>2002-10-15 21:19:51 +0000
commit2b2bb4eb21fcf80f1b704a1862f37ddb54294a92 (patch)
tree594c7f04c12e3f4176dad7e1fc948b92a6042745 /gdb/gdbtk/library
parentc7ae429840bb9739556aac5be37dc75e28cd3a26 (diff)
downloadgdb-2b2bb4eb21fcf80f1b704a1862f37ddb54294a92.tar.gz
2002-10-15 Martin M. Hunt <hunt@redhat.com>
* library/* : auto_mkindex cannot rebuild tclIndex because it does not recognize the namespace import in main.tcl. To get it to work again, rename the following: body -> itcl::body configbody -> itcl::configbody class -> itcl::class
Diffstat (limited to 'gdb/gdbtk/library')
-rw-r--r--gdb/gdbtk/library/Makefile2
-rw-r--r--gdb/gdbtk/library/about.tcl2
-rw-r--r--gdb/gdbtk/library/actiondlg.tcl2
-rw-r--r--gdb/gdbtk/library/attachdlg.itb18
-rw-r--r--gdb/gdbtk/library/attachdlg.ith2
-rw-r--r--gdb/gdbtk/library/blockframe.itb38
-rw-r--r--gdb/gdbtk/library/blockframe.ith4
-rw-r--r--gdb/gdbtk/library/bpwin.itb40
-rw-r--r--gdb/gdbtk/library/bpwin.ith2
-rw-r--r--gdb/gdbtk/library/browserwin.itb46
-rw-r--r--gdb/gdbtk/library/browserwin.ith2
-rw-r--r--gdb/gdbtk/library/console.itb52
-rw-r--r--gdb/gdbtk/library/console.ith2
-rw-r--r--gdb/gdbtk/library/data.itb14
-rw-r--r--gdb/gdbtk/library/data.ith4
-rw-r--r--gdb/gdbtk/library/debugwin.itb30
-rw-r--r--gdb/gdbtk/library/debugwin.ith4
-rw-r--r--gdb/gdbtk/library/download.itb16
-rw-r--r--gdb/gdbtk/library/download.ith2
-rw-r--r--gdb/gdbtk/library/ehandler.itb2
-rw-r--r--gdb/gdbtk/library/ehandler.ith2
-rw-r--r--gdb/gdbtk/library/embeddedwin.ith2
-rw-r--r--gdb/gdbtk/library/gdbevent.itb20
-rw-r--r--gdb/gdbtk/library/gdbevent.ith16
-rw-r--r--gdb/gdbtk/library/gdbmenubar.itcl2
-rw-r--r--gdb/gdbtk/library/gdbtoolbar.itcl2
-rw-r--r--gdb/gdbtk/library/gdbwin.ith2
-rw-r--r--gdb/gdbtk/library/globalpref.itb30
-rw-r--r--gdb/gdbtk/library/globalpref.ith2
-rw-r--r--gdb/gdbtk/library/helpviewer.itb28
-rw-r--r--gdb/gdbtk/library/helpviewer.ith4
-rw-r--r--gdb/gdbtk/library/kod.itb34
-rw-r--r--gdb/gdbtk/library/kod.ith2
-rw-r--r--gdb/gdbtk/library/locals.tcl2
-rw-r--r--gdb/gdbtk/library/managedwin.itb36
-rw-r--r--gdb/gdbtk/library/managedwin.ith2
-rw-r--r--gdb/gdbtk/library/mempref.itb30
-rw-r--r--gdb/gdbtk/library/mempref.ith2
-rw-r--r--gdb/gdbtk/library/memwin.itb54
-rw-r--r--gdb/gdbtk/library/memwin.ith2
-rw-r--r--gdb/gdbtk/library/modal.tcl2
-rw-r--r--gdb/gdbtk/library/pluginwin.itcl2
-rw-r--r--gdb/gdbtk/library/process.itb18
-rw-r--r--gdb/gdbtk/library/process.ith2
-rw-r--r--gdb/gdbtk/library/regwin.itb54
-rw-r--r--gdb/gdbtk/library/regwin.ith2
-rw-r--r--gdb/gdbtk/library/srcbar.itcl2
-rw-r--r--gdb/gdbtk/library/srcpref.itb18
-rw-r--r--gdb/gdbtk/library/srcpref.ith2
-rw-r--r--gdb/gdbtk/library/srctextwin.itb144
-rw-r--r--gdb/gdbtk/library/srctextwin.ith2
-rw-r--r--gdb/gdbtk/library/srcwin.itb82
-rw-r--r--gdb/gdbtk/library/srcwin.ith2
-rw-r--r--gdb/gdbtk/library/stackwin.itb24
-rw-r--r--gdb/gdbtk/library/stackwin.ith2
-rw-r--r--gdb/gdbtk/library/targetselection.itb56
-rw-r--r--gdb/gdbtk/library/targetselection.ith2
-rw-r--r--gdb/gdbtk/library/tdump.tcl2
-rw-r--r--gdb/gdbtk/library/toolbar.tcl2
-rw-r--r--gdb/gdbtk/library/toplevelwin.ith2
-rw-r--r--gdb/gdbtk/library/tracedlg.tcl2
-rw-r--r--gdb/gdbtk/library/variables.tcl18
-rw-r--r--gdb/gdbtk/library/warning.tcl4
-rw-r--r--gdb/gdbtk/library/watch.tcl2
64 files changed, 503 insertions, 503 deletions
diff --git a/gdb/gdbtk/library/Makefile b/gdb/gdbtk/library/Makefile
index 0a9319743ca..c1e653b7944 100644
--- a/gdb/gdbtk/library/Makefile
+++ b/gdb/gdbtk/library/Makefile
@@ -1,7 +1,7 @@
TCL := $(wildcard *.tcl *.itcl *.ith *.itb)
-TCLSH = tclsh8.3
+TCLSH = tclsh
tclIndex: $(TCL) Makefile
echo "package require Itcl; auto_mkindex `pwd` $(TCL)" | $(TCLSH)
diff --git a/gdb/gdbtk/library/about.tcl b/gdb/gdbtk/library/about.tcl
index f10adab99a1..af703081638 100644
--- a/gdb/gdbtk/library/about.tcl
+++ b/gdb/gdbtk/library/about.tcl
@@ -16,7 +16,7 @@
# Implements About window
# ----------------------------------------------------------------------
-class About {
+itcl::class About {
inherit ManagedWin ModalDialog
constructor {args} {
global gdb_ImageDir
diff --git a/gdb/gdbtk/library/actiondlg.tcl b/gdb/gdbtk/library/actiondlg.tcl
index cffcae8dc82..f3ff6a2480b 100644
--- a/gdb/gdbtk/library/actiondlg.tcl
+++ b/gdb/gdbtk/library/actiondlg.tcl
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class ActionDlg {
+itcl::class ActionDlg {
inherit ManagedWin
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/attachdlg.itb b/gdb/gdbtk/library/attachdlg.itb
index 00d5a44059d..4248303b76d 100644
--- a/gdb/gdbtk/library/attachdlg.itb
+++ b/gdb/gdbtk/library/attachdlg.itb
@@ -7,7 +7,7 @@
# Copyright (C) 1999 Cygnus Solutions
#
-body AttachDlg::constructor {args} {
+itcl::body AttachDlg::constructor {args} {
window_name "Attach To Process"
build_win
@@ -15,7 +15,7 @@ body AttachDlg::constructor {args} {
}
-body AttachDlg::build_win {} {
+itcl::body AttachDlg::build_win {} {
# CHOOSE_PID: the list box with list or processes. Also an entry
# for typing in the PID by hand.
@@ -114,7 +114,7 @@ body AttachDlg::build_win {} {
# METHOD: doit - This accepts the attach command.
# ------------------------------------------------------------------
-body AttachDlg::doit {} {
+itcl::body AttachDlg::doit {} {
set AttachDlg::last_button 1
set AttachDlg::last_pid [$itk_component(pid_entry) get]
set AttachDlg::symbol_file [$itk_component(symbol_file) get]
@@ -126,7 +126,7 @@ body AttachDlg::doit {} {
# METHOD: cancel - unpost the dialog box without attaching.
# ------------------------------------------------------------------
-body AttachDlg::cancel {} {
+itcl::body AttachDlg::cancel {} {
set AttachDlg::last_button 0
set AttachDlg::last_pid {}
unpost
@@ -136,7 +136,7 @@ body AttachDlg::cancel {} {
# METHOD: choose_symbol_file - Query for a new symbol file.
# ------------------------------------------------------------------
-body AttachDlg::choose_symbol_file {} {
+itcl::body AttachDlg::choose_symbol_file {} {
set file [tk_getOpenFile -parent . -title "Load New Executable"]
if {$file != ""} {
$itk_component(symbol_file) configure -state normal
@@ -155,7 +155,7 @@ body AttachDlg::choose_symbol_file {} {
# point we should steal some C code to do it by hand.
# ------------------------------------------------------------------
-body AttachDlg::list_pids {{pattern *}} {
+itcl::body AttachDlg::list_pids {{pattern *}} {
global tcl_platform
switch $tcl_platform(os) {
@@ -204,7 +204,7 @@ You will have to enter the PID by hand."
# and insert the associated PID into the entry form.
# ------------------------------------------------------------------
-body AttachDlg::select_pid {} {
+itcl::body AttachDlg::select_pid {} {
set hit [$itk_component(choose_pid) curselection]
if {$hit != ""} {
$itk_component(pid_entry) clear
@@ -216,7 +216,7 @@ body AttachDlg::select_pid {} {
# METHOD: clear_pid_selection - Clear the current PID selection.
# ------------------------------------------------------------------
-body AttachDlg::clear_pid_selection {} {
+itcl::body AttachDlg::clear_pid_selection {} {
$itk_component(choose_pid) selection clear 0 end
$itk_component(pid_entry) selection range 0 end
}
@@ -225,7 +225,7 @@ body AttachDlg::clear_pid_selection {} {
# METHOD: filter_pid_selection - Filters the pid box.
# ------------------------------------------------------------------
-body AttachDlg::filter_pid_selection {} {
+itcl::body AttachDlg::filter_pid_selection {} {
list_pids [$itk_component(pid_filter) get]
}
diff --git a/gdb/gdbtk/library/attachdlg.ith b/gdb/gdbtk/library/attachdlg.ith
index b31130c243c..71ee4876eb0 100644
--- a/gdb/gdbtk/library/attachdlg.ith
+++ b/gdb/gdbtk/library/attachdlg.ith
@@ -6,7 +6,7 @@
# ----------------------------------------------------------------------
# Copyright (C) 1999 Cygnus Solutions
#
-class AttachDlg {
+itcl::class AttachDlg {
inherit ModalDialog ManagedWin
public {
diff --git a/gdb/gdbtk/library/blockframe.itb b/gdb/gdbtk/library/blockframe.itb
index 2076f5dfc65..09977af732c 100644
--- a/gdb/gdbtk/library/blockframe.itb
+++ b/gdb/gdbtk/library/blockframe.itb
@@ -14,7 +14,7 @@
# ------------------------------------------------------------------
# Block
# ------------------------------------------------------------------
-body Block::constructor {start end args} {
+itcl::body Block::constructor {start end args} {
# Record runtime info about this block
set _start $start
@@ -24,7 +24,7 @@ body Block::constructor {start end args} {
}
# Destroy ourself.
-body Block::destructor {} {
+itcl::body Block::destructor {} {
# Each block is responsible for destroying its
# variables and removing them from the list of
@@ -36,12 +36,12 @@ body Block::destructor {} {
# Return a list of variables defined in this block
# This list is determined when we are created.
-body Block::variables {} {
+itcl::body Block::variables {} {
return $_variables
}
# Find the new variables for this block.
-body Block::_findVariables {} {
+itcl::body Block::_findVariables {} {
# Find the new variables for this block.
set variables [gdb_block_variables $_start $_end]
@@ -59,7 +59,7 @@ body Block::_findVariables {} {
return $vars
}
-body Block::update {} {
+itcl::body Block::update {} {
set changed {}
foreach var $_variables {
@@ -69,7 +69,7 @@ body Block::update {} {
return $changed
}
-body Block::info {} {
+itcl::body Block::info {} {
return [list $_start $_end]
}
@@ -77,7 +77,7 @@ body Block::info {} {
# ------------------------------------------------------------------
# Frame
# ------------------------------------------------------------------
-body Frame::constructor {addr} {
+itcl::body Frame::constructor {addr} {
set _addr $addr
@@ -87,14 +87,14 @@ body Frame::constructor {addr} {
}
-body Frame::destructor {} {
+itcl::body Frame::destructor {} {
# destroy our own blocks
foreach block $_blocks {
_removeBlock $block
}
}
-body Frame::_removeBlock {blockObj} {
+itcl::body Frame::_removeBlock {blockObj} {
set i [lsearch $_blocks $blockObj]
if {$i != -1} {
@@ -103,7 +103,7 @@ body Frame::_removeBlock {blockObj} {
}
}
-body Frame::_addBlock {block} {
+itcl::body Frame::_addBlock {block} {
set start [lindex $block 0]
set end [lindex $block 1]
@@ -113,14 +113,14 @@ body Frame::_addBlock {block} {
return $b
}
-body Frame::_createBlocks {blocks} {
+itcl::body Frame::_createBlocks {blocks} {
foreach block $blocks {
set b [_addBlock $block]
}
}
-body Frame::update {} {
+itcl::body Frame::update {} {
set vars {}
foreach block $_blocks {
@@ -130,7 +130,7 @@ body Frame::update {} {
return $vars
}
-body Frame::variables {} {
+itcl::body Frame::variables {} {
set vars {}
foreach block $_blocks {
@@ -140,7 +140,7 @@ body Frame::variables {} {
return $vars
}
-body Frame::new {} {
+itcl::body Frame::new {} {
# find any new variables. So get a list of all blocks,
# eliminate duplicates, and get those variables.
@@ -159,14 +159,14 @@ body Frame::new {} {
return $new
}
-body Frame::deleteOld {} {
+itcl::body Frame::deleteOld {} {
foreach block [_oldBlocks] {
_removeBlock $block
}
}
-body Frame::_oldBlocks {} {
+itcl::body Frame::_oldBlocks {} {
set blocks [gdb_get_blocks]
set oldObjs $_blocks
@@ -183,7 +183,7 @@ body Frame::_oldBlocks {} {
return $oldObjs
}
-body Frame::old {} {
+itcl::body Frame::old {} {
# All the variables in the blocks in old are now gone...
# We don't remove blocks here, since the frontend viewer
@@ -198,7 +198,7 @@ body Frame::old {} {
return $vars
}
-body Frame::_findBlock {block} {
+itcl::body Frame::_findBlock {block} {
foreach b $_blocks {
set info [$b info]
@@ -210,7 +210,7 @@ body Frame::_findBlock {block} {
return ""
}
-body Frame::_findBlockIndex {block} {
+itcl::body Frame::_findBlockIndex {block} {
set i 0
foreach b $_blocks {
diff --git a/gdb/gdbtk/library/blockframe.ith b/gdb/gdbtk/library/blockframe.ith
index a147f7c60a7..e2fdb8feca7 100644
--- a/gdb/gdbtk/library/blockframe.ith
+++ b/gdb/gdbtk/library/blockframe.ith
@@ -11,7 +11,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-class Block {
+itcl::class Block {
public {
method constructor {start end args}
@@ -33,7 +33,7 @@ class Block {
}
}
-class Frame {
+itcl::class Frame {
public {
method constructor {addr}
diff --git a/gdb/gdbtk/library/bpwin.itb b/gdb/gdbtk/library/bpwin.itb
index 5c854c4c0a6..b8ec482296e 100644
--- a/gdb/gdbtk/library/bpwin.itb
+++ b/gdb/gdbtk/library/bpwin.itb
@@ -15,7 +15,7 @@
# ------------------------------------------------------------------
# CONSTRUCTOR: create the main breakpoint window
# ------------------------------------------------------------------
-body BpWin::constructor {args} {
+itcl::body BpWin::constructor {args} {
window_name "Breakpoints" "BPs"
if {[pref getd gdb/bp/menu] != ""} {
@@ -37,13 +37,13 @@ body BpWin::constructor {args} {
# ------------------------------------------------------------------
# DESTRUCTOR: destroy the breakpoint window
# ------------------------------------------------------------------
-body BpWin::destructor {} {}
+itcl::body BpWin::destructor {} {}
# ------------------------------------------------------------------
# METHOD: build_win - build the main breakpoint window
# ------------------------------------------------------------------
-body BpWin::build_win {} {
+itcl::body BpWin::build_win {} {
global _bp_en _bp_disp tcl_platform
set bg1 $::Colors(bg)
@@ -201,7 +201,7 @@ body BpWin::build_win {} {
# ------------------------------------------------------------------
# METHOD: bp_add - add a breakpoint entry
# ------------------------------------------------------------------
-body BpWin::bp_add {bp_event {tracepoint 0}} {
+itcl::body BpWin::bp_add {bp_event {tracepoint 0}} {
global _bp_en _bp_disp tcl_platform _files
set number [$bp_event get number]
@@ -303,7 +303,7 @@ body BpWin::bp_add {bp_event {tracepoint 0}} {
# METHOD: bp_store - stores away the breakpoints in a file of gdb
# commands
# ------------------------------------------------------------------
-body BpWin::bp_store {} {
+itcl::body BpWin::bp_store {} {
set out_file [tk_getSaveFile]
if {$out_file == ""} {
return
@@ -350,7 +350,7 @@ body BpWin::bp_store {} {
# METHOD: bp_restore - restore the breakpoints from a file of gdb
# commands
# ------------------------------------------------------------------
-body BpWin::bp_restore {} {
+itcl::body BpWin::bp_restore {} {
set inH [tk_getOpenFile]
if {$inH == ""} {
return
@@ -364,7 +364,7 @@ body BpWin::bp_restore {} {
# ------------------------------------------------------------------
# METHOD: bp_select - select a row in the grid
# ------------------------------------------------------------------
-body BpWin::bp_select { r } {
+itcl::body BpWin::bp_select { r } {
global _bp_en _bp_disp
set zz [list addr file func line]
@@ -435,7 +435,7 @@ body BpWin::bp_select { r } {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body BpWin::_select_and_popup {bp X Y} {
+itcl::body BpWin::_select_and_popup {bp X Y} {
if {$selected != $bp} {
bp_select $bp
}
@@ -445,7 +445,7 @@ body BpWin::_select_and_popup {bp X Y} {
# ------------------------------------------------------------------
# METHOD: bp_modify - modify a breakpoint entry
# ------------------------------------------------------------------
-body BpWin::bp_modify {bp_event {tracepoint 0}} {
+itcl::body BpWin::bp_modify {bp_event {tracepoint 0}} {
global _bp_en _bp_disp tcl_platform _files
set number [$bp_event get number]
@@ -523,7 +523,7 @@ body BpWin::bp_modify {bp_event {tracepoint 0}} {
# ------------------------------------------------------------------
# METHOD: bp_able - enable/disable a breakpoint
# ------------------------------------------------------------------
-body BpWin::bp_able { i } {
+itcl::body BpWin::bp_able { i } {
global _bp_en
bp_select $i
@@ -546,7 +546,7 @@ body BpWin::bp_able { i } {
# ------------------------------------------------------------------
# METHOD: bp_remove - remove a breakpoint
# ------------------------------------------------------------------
-body BpWin::bp_remove { i } {
+itcl::body BpWin::bp_remove { i } {
bp_select $i
@@ -561,7 +561,7 @@ body BpWin::bp_remove { i } {
# ------------------------------------------------------------------
# METHOD: bp_type - change the breakpoint type (disposition)
# ------------------------------------------------------------------
-body BpWin::bp_type { i } {
+itcl::body BpWin::bp_type { i } {
if {$Index_to_bptype($i) != "breakpoint"} {
return
@@ -589,7 +589,7 @@ body BpWin::bp_type { i } {
# ------------------------------------------------------------------
# METHOD: bp_delete - delete a breakpoint
# ------------------------------------------------------------------
-body BpWin::bp_delete {bp_event} {
+itcl::body BpWin::bp_delete {bp_event} {
set number [$bp_event get number]
for {set i 1} {$i < $next_row} {incr i} {
if { $number == $index_to_bpnum($i) } {
@@ -618,7 +618,7 @@ body BpWin::bp_delete {bp_event} {
# PUBLIC METHOD: breakpoint - Update widget when a breakpoint
# event is received from the backend.
# ------------------------------------------------------------------
-body BpWin::breakpoint {bp_event} {
+itcl::body BpWin::breakpoint {bp_event} {
set action [$bp_event get action]
#debug "bp update $action [$bp_event get number] [$bp_event get type]"
@@ -635,7 +635,7 @@ body BpWin::breakpoint {bp_event} {
# METHOD: tracepoint - Update widget when a tracepoint event
# is received from the backend.
# ------------------------------------------------------------------
-body BpWin::tracepoint {tp_event} {
+itcl::body BpWin::tracepoint {tp_event} {
set action [$tp_event get action]
#debug "tp update $action [$tp_event get number]"
@@ -651,7 +651,7 @@ body BpWin::tracepoint {tp_event} {
# ------------------------------------------------------------------
# METHOD: bp_all - perform a command on all breakpoints
# ------------------------------------------------------------------
-body BpWin::bp_all { command } {
+itcl::body BpWin::bp_all { command } {
if {!$tracepoints} {
# Do all breakpoints
@@ -690,7 +690,7 @@ body BpWin::bp_all { command } {
# METHOD: get_actions - pops up the add trace dialog on a selected
# tracepoint
# ------------------------------------------------------------------
-body BpWin::get_actions {bpnum} {
+itcl::body BpWin::get_actions {bpnum} {
set bpnum $index_to_bpnum($bpnum)
set bpinfo [gdb_get_tracepoint_info $bpnum]
lassign $bpinfo file func line pc enabled pass_count \
@@ -703,7 +703,7 @@ body BpWin::get_actions {bpnum} {
# ------------------------------------------------------------------
# METHOD: toggle_threads - callback when show_threads is toggled
# ------------------------------------------------------------------
-body BpWin::toggle_threads {} {
+itcl::body BpWin::toggle_threads {} {
set show_threads [pref get gdb/bp/show_threads]
reconfig
}
@@ -711,7 +711,7 @@ body BpWin::toggle_threads {} {
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body BpWin::reconfig {} {
+itcl::body BpWin::reconfig {} {
if {[winfo exists $itk_interior.f]} { destroy $itk_interior.f }
if {[winfo exists $itk_interior.m]} { destroy $itk_interior.m }
if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
@@ -723,7 +723,7 @@ body BpWin::reconfig {} {
# ------------------------------------------------------------------
# METHOD: goto_bp - show bp in source window
# ------------------------------------------------------------------
-body BpWin::goto_bp {r} {
+itcl::body BpWin::goto_bp {r} {
set bpnum $index_to_bpnum($r)
if {$tracepoints} {
set bpinfo [gdb_get_tracepoint_info $bpnum]
diff --git a/gdb/gdbtk/library/bpwin.ith b/gdb/gdbtk/library/bpwin.ith
index 43d93cb990e..81c7c731f7a 100644
--- a/gdb/gdbtk/library/bpwin.ith
+++ b/gdb/gdbtk/library/bpwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class BpWin {
+itcl::class BpWin {
inherit EmbeddedWin GDBWin
public {
diff --git a/gdb/gdbtk/library/browserwin.itb b/gdb/gdbtk/library/browserwin.itb
index 61cc1b9664e..5101c0df97e 100644
--- a/gdb/gdbtk/library/browserwin.itb
+++ b/gdb/gdbtk/library/browserwin.itb
@@ -23,7 +23,7 @@
option add *BrowserWin.textBackground white
-body BrowserWin::constructor {args} {
+itcl::body BrowserWin::constructor {args} {
#eval itk_initialize $args
window_name "Function Browser"
@@ -42,7 +42,7 @@ body BrowserWin::constructor {args} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body BrowserWin::destructor {} {
+itcl::body BrowserWin::destructor {} {
if {$resize_after != ""} {
after cancel $resize_after
@@ -65,7 +65,7 @@ body BrowserWin::destructor {} {
# ------------------------------------------------------------------
# METHOD: _build_win - build the main browser window
# ------------------------------------------------------------------
-body BrowserWin::_build_win {} {
+itcl::body BrowserWin::_build_win {} {
global PREFS_state gdb_ImageDir
# Three frames: regexp, listboxes, and drop-down pane
@@ -380,7 +380,7 @@ body BrowserWin::_build_win {} {
# box. The actual filtering is done in an after to avoid
# flashing too much if the user is typing quickly.
# ------------------------------------------------------------------
-body BrowserWin::_filter_trace_proc {v1 v2 mode} {
+itcl::body BrowserWin::_filter_trace_proc {v1 v2 mode} {
if {$filter_trace_after != ""} {
after cancel $filter_trace_after
}
@@ -391,7 +391,7 @@ body BrowserWin::_filter_trace_proc {v1 v2 mode} {
# METHOD: _filter_trace_after
# This is a wrapper around search, needed to pass to trace
# ------------------------------------------------------------------
-body BrowserWin::_filter_trace_after {} {
+itcl::body BrowserWin::_filter_trace_after {} {
set filter_trace_after ""
search
}
@@ -401,7 +401,7 @@ body BrowserWin::_filter_trace_after {} {
# Search for text or jump to a specific line
# in source window, going in the specified DIRECTION.
# ------------------------------------------------------------------
-body BrowserWin::_search_src {direction} {
+itcl::body BrowserWin::_search_src {direction} {
set exp [$itk_component(view_search) get]
$itk_component(view_src) search $exp $direction
}
@@ -411,7 +411,7 @@ body BrowserWin::_search_src {direction} {
# Search for functions matching regexp/pattern
# in specified files
# ------------------------------------------------------------------
-body BrowserWin::search {} {
+itcl::body BrowserWin::search {} {
set files [$itk_component(file_box) getcurselection]
@@ -454,7 +454,7 @@ body BrowserWin::search {} {
# METHOD: _toggle_more
# Toggle display of source listing
# ------------------------------------------------------------------
-body BrowserWin::_toggle_more {{in_constructor 0}} {
+itcl::body BrowserWin::_toggle_more {{in_constructor 0}} {
debug "Running toggle_more with MoreVisible: $MoreVisible"
# Temporarily disable the resize bindings before opening the window.
@@ -565,7 +565,7 @@ body BrowserWin::_toggle_more {{in_constructor 0}} {
# METHOD: _bind_toplevel
# Setup the bindings for the toplevel.
# ------------------------------------------------------------------
-body BrowserWin::_bind_toplevel {install} {
+itcl::body BrowserWin::_bind_toplevel {install} {
set bindings [bindtags $_top]
if {$install} {
@@ -580,7 +580,7 @@ body BrowserWin::_bind_toplevel {install} {
# METHOD: _do_resize
# Does the actual work of the resize.
# ------------------------------------------------------------------
-body BrowserWin::_do_resize {} {
+itcl::body BrowserWin::_do_resize {} {
update idletasks
debug "Running _do_resize"
@@ -613,7 +613,7 @@ body BrowserWin::_do_resize {} {
# METHOD: _resize
# Resize "itk_component(view_hidden)" after all configure events
# ------------------------------------------------------------------
-body BrowserWin::_resize {} {
+itcl::body BrowserWin::_resize {} {
pack propagate $_top 0
@@ -638,7 +638,7 @@ body BrowserWin::_resize {} {
# This fills the func combo, and the more window if it
# is currently open with the hit in the File combobox.
# ------------------------------------------------------------------
-body BrowserWin::_process_file_selection {y} {
+itcl::body BrowserWin::_process_file_selection {y} {
set curIndex [$itk_component(file_box) nearest $y]
set curSelection [$itk_component(file_box) curselection]
@@ -668,7 +668,7 @@ body BrowserWin::_process_file_selection {y} {
# This points the more window to the hit in the Func combobox
# if it is currently open.
# ------------------------------------------------------------------
-body BrowserWin::_process_func_selection {y} {
+itcl::body BrowserWin::_process_func_selection {y} {
set curIndex [$itk_component(func_box) nearest $y]
set curSelection [$itk_component(func_box) curselection]
@@ -687,7 +687,7 @@ body BrowserWin::_process_func_selection {y} {
# METHOD: do_all_bp
# Toggle a bp at every selected function in FuncLB
# ------------------------------------------------------------------
-body BrowserWin::do_all_bp {onp} {
+itcl::body BrowserWin::do_all_bp {onp} {
set funcs [$itk_component(func_box) getcurselection]
_freeze_me
@@ -716,7 +716,7 @@ body BrowserWin::do_all_bp {onp} {
# Toggle bp at function specified by the given Y
# coordinate in the listbox
# ------------------------------------------------------------------
-body BrowserWin::_toggle_bp {y} {
+itcl::body BrowserWin::_toggle_bp {y} {
set f [$itk_component(func_box) get [$itk_component(func_box) nearest $y]]
if {$f != ""} {
@@ -739,7 +739,7 @@ body BrowserWin::_toggle_bp {y} {
# METHOD: _select
# (Un/Highlight all files in the files list
# ------------------------------------------------------------------
-body BrowserWin::_select {highlight} {
+itcl::body BrowserWin::_select {highlight} {
if {$highlight} {
$itk_component(file_box) selection set 0 end
} else {
@@ -752,7 +752,7 @@ body BrowserWin::_select {highlight} {
# METHOD: _set_filter_mode
# React to changes in the filter mode
# ------------------------------------------------------------------
-body BrowserWin::_set_filter_mode {w mode} {
+itcl::body BrowserWin::_set_filter_mode {w mode} {
if {[string compare $mode $cur_filter_mode] != 0} {
set cur_filter_mode $mode
pref set gdb/search/filter_mode $mode
@@ -764,7 +764,7 @@ body BrowserWin::_set_filter_mode {w mode} {
# METHOD: _file_hide_h
# Run when the "Hide .h files" preference is chosen.
# ------------------------------------------------------------------
-body BrowserWin::_file_hide_h {} {
+itcl::body BrowserWin::_file_hide_h {} {
_fill_file_box
search
@@ -776,7 +776,7 @@ body BrowserWin::_file_hide_h {} {
# Helper function to fill the srctextwin
# when needed.
# ------------------------------------------------------------------
-body BrowserWin::_fill_source {f {funcp 1} {filename ""}} {
+itcl::body BrowserWin::_fill_source {f {funcp 1} {filename ""}} {
if {!$MoreVisible } {
return
@@ -830,7 +830,7 @@ body BrowserWin::_fill_source {f {funcp 1} {filename ""}} {
# Function called by srctextwin when the display
# mode changes
# ------------------------------------------------------------------
-body BrowserWin::mode {w {mode ""} {go 1}} {
+itcl::body BrowserWin::mode {w {mode ""} {go 1}} {
if {$mode != ""} {
$itk_component(view_src) mode_set $mode $go
$itk_component(view_mode) entryset $mode
@@ -842,7 +842,7 @@ body BrowserWin::mode {w {mode ""} {go 1}} {
# Callback for the function combo box which
# sets the srctextwin looking at the given function (VAL)
# ------------------------------------------------------------------
-body BrowserWin::_goto_func {w {val ""}} {
+itcl::body BrowserWin::_goto_func {w {val ""}} {
if {$val != ""} {
set mang 0
if {[info exists _mangled_func($val)]} {
@@ -868,7 +868,7 @@ body BrowserWin::_goto_func {w {val ""}} {
# METHOD: _fill_file_box
# This private method fills the file listbox
# ------------------------------------------------------------------
-body BrowserWin::_fill_file_box {} {
+itcl::body BrowserWin::_fill_file_box {} {
# It would be cool if gdb_listfiles took a regexp to match,
# but it doesn't...
@@ -893,7 +893,7 @@ body BrowserWin::_fill_file_box {} {
# This private method fills the functions combo box
# with all the functions in NAME.
# ------------------------------------------------------------------
-body BrowserWin::_fill_funcs_combo {name} {
+itcl::body BrowserWin::_fill_funcs_combo {name} {
$itk_component(view_func) list delete 0 end
if {$name != ""} {
diff --git a/gdb/gdbtk/library/browserwin.ith b/gdb/gdbtk/library/browserwin.ith
index 3ea41b3e106..00a8f54351b 100644
--- a/gdb/gdbtk/library/browserwin.ith
+++ b/gdb/gdbtk/library/browserwin.ith
@@ -11,7 +11,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-class BrowserWin {
+itcl::class BrowserWin {
inherit EmbeddedWin
public {
diff --git a/gdb/gdbtk/library/console.itb b/gdb/gdbtk/library/console.itb
index 0cd96fb7ec6..c31c7004011 100644
--- a/gdb/gdbtk/library/console.itb
+++ b/gdb/gdbtk/library/console.itb
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-body Console::constructor {args} {
+itcl::body Console::constructor {args} {
global gdbtk_state
window_name "Console Window"
@@ -36,13 +36,13 @@ body Console::constructor {args} {
set gdbtk_state(console) $this
}
-body Console::destructor {} {
+itcl::body Console::destructor {} {
global gdbtk_state
set gdbtk_state(console) ""
remove_hook gdb_no_inferior_hook [list $this idle dummy]
}
-body Console::_build_win {} {
+itcl::body Console::_build_win {} {
iwidgets::scrolledtext $itk_interior.stext \
-vscrollmode dynamic -textbackground white
@@ -202,7 +202,7 @@ body Console::_build_win {} {
}
-body Console::idle {event} {
+itcl::body Console::idle {event} {
set _running 0
$_top configure -cursor {}
}
@@ -210,7 +210,7 @@ body Console::idle {event} {
# ------------------------------------------------------------------
# METHOD: busy - busy event handler
# ------------------------------------------------------------------
-body Console::busy {event} {
+itcl::body Console::busy {event} {
set _running 1
$_top configure -cursor watch
}
@@ -218,7 +218,7 @@ body Console::busy {event} {
# ------------------------------------------------------------------
# METHOD: insert - insert new text in the text widget
# ------------------------------------------------------------------
-body Console::insert {line {tag ""}} {
+itcl::body Console::insert {line {tag ""}} {
if {$_needNL} {
$_twin insert {insert linestart} "\n"
}
@@ -247,7 +247,7 @@ body Console::insert {line {tag ""}} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body Console::_operate_and_get_next {} {
+itcl::body Console::_operate_and_get_next {} {
if {$_histElement >= 0} {
# _pendingHistElement will be used after the new history element
# is pushed. So we must increment it.
@@ -259,7 +259,7 @@ body Console::_operate_and_get_next {} {
#-------------------------------------------------------------------
# METHOD: _previous - recall the previous command
# ------------------------------------------------------------------
-body Console::_previous {} {
+itcl::body Console::_previous {} {
if {$_histElement == -1} {
# Save partial command.
set _partialCommand [$_twin get {cmdmark + 1 char} {cmdmark lineend}]
@@ -279,7 +279,7 @@ body Console::_previous {} {
#-------------------------------------------------------------------
# METHOD: _search_history - search history for match
# ------------------------------------------------------------------
-body Console::_search_history {} {
+itcl::body Console::_search_history {} {
set str [$_twin get {cmdmark + 1 char} {cmdmark lineend}]
if {$_histElement == -1} {
@@ -304,7 +304,7 @@ body Console::_search_history {} {
#-------------------------------------------------------------------
# METHOD: _rsearch_history - search history in reverse for match
# ------------------------------------------------------------------
-body Console::_rsearch_history {} {
+itcl::body Console::_rsearch_history {} {
if {$_histElement != -1} {
set str $_partialCommand
set num [expr $_histElement - 1]
@@ -332,7 +332,7 @@ body Console::_rsearch_history {} {
#-------------------------------------------------------------------
# METHOD: _next - recall the next command (scroll forward)
# ------------------------------------------------------------------
-body Console::_next {} {
+itcl::body Console::_next {} {
if {$_histElement == -1} {
# FIXME flash window.
return
@@ -350,7 +350,7 @@ body Console::_next {} {
#-------------------------------------------------------------------
# METHOD: _last - get the last history element
# ------------------------------------------------------------------
-body Console::_last {} {
+itcl::body Console::_last {} {
set _histElement 0
_next
}
@@ -358,7 +358,7 @@ body Console::_last {} {
#-------------------------------------------------------------------
# METHOD: _first - get the first (earliest) history element
# ------------------------------------------------------------------
-body Console::_first {} {
+itcl::body Console::_first {} {
set _histElement [expr {[llength $_history] - 1}]
_previous
}
@@ -368,7 +368,7 @@ body Console::_first {} {
#-------------------------------------------------------------------
# METHOD: _setprompt - put a prompt at the beginning of a line
# ------------------------------------------------------------------
-body Console::_setprompt {{prompt {}}} {
+itcl::body Console::_setprompt {{prompt {}}} {
if {$_invoking} {
set prompt ""
} elseif {"$prompt" != ""} {
@@ -392,7 +392,7 @@ body Console::_setprompt {{prompt {}}} {
#-------------------------------------------------------------------
# METHOD: activate - run this after a command is run
# ------------------------------------------------------------------
-body Console::activate {{prompt {}}} {
+itcl::body Console::activate {{prompt {}}} {
if {$_invoking > 0} {
incr _invoking -1
_setprompt $prompt
@@ -402,7 +402,7 @@ body Console::activate {{prompt {}}} {
#-------------------------------------------------------------------
# METHOD: invoke - invoke a command
# ------------------------------------------------------------------
-body Console::invoke {} {
+itcl::body Console::invoke {} {
global gdbtk_state
set text [$_twin get {cmdmark + 1 char} end ]
@@ -482,7 +482,7 @@ body Console::invoke {} {
#-------------------------------------------------------------------
# PRIVATE METHOD: _delete - Handle a Delete of some sort.
# ------------------------------------------------------------------
-body Console::_delete {{right 0}} {
+itcl::body Console::_delete {{right 0}} {
# If we are deleting to the right, and we have this turned off,
# delete to the right.
@@ -520,7 +520,7 @@ body Console::_delete {{right 0}} {
#-------------------------------------------------------------------
# PRIVATE METHOD: _insertion - Set or get saved insertion point
# ------------------------------------------------------------------
-body Console::_insertion {args} {
+itcl::body Console::_insertion {args} {
if {! [llength $args]} {
return $_saved_insertion
} else {
@@ -531,7 +531,7 @@ body Console::_insertion {args} {
# ------------------------------------------------------------------
# METHOD: _paste - paste the selection into the console window
# ------------------------------------------------------------------
-body Console::_paste {{check_primary 1}} {
+itcl::body Console::_paste {{check_primary 1}} {
set sel {}
if {!$check_primary || [catch {selection get} sel] || $sel == ""} {
@@ -555,7 +555,7 @@ body Console::_paste {{check_primary 1}} {
# METHOD: _find_lcp - Return the longest common prefix in SLIST.
# Can be empty string.
# ------------------------------------------------------------------
-body Console::_find_lcp {slist} {
+itcl::body Console::_find_lcp {slist} {
# Handle trivial cases where list is empty or length 1
if {[llength $slist] <= 1} {return [lindex $slist 0]}
@@ -578,7 +578,7 @@ body Console::_find_lcp {slist} {
# METHOD: _find_completion - Look through COMPLETIONS to generate
# the suffix needed to do command
# ------------------------------------------------------------------
-body Console::_find_completion {cmd completions} {
+itcl::body Console::_find_completion {cmd completions} {
# Get longest common prefix
set lcp [_find_lcp $completions]
set cmd_len [string length $cmd]
@@ -589,7 +589,7 @@ body Console::_find_completion {cmd completions} {
# ------------------------------------------------------------------
# METHOD: _complete - Command line completion
# ------------------------------------------------------------------
-body Console::_complete {} {
+itcl::body Console::_complete {} {
set command_line [$_twin get {cmdmark + 1 char} {cmdmark lineend}]
set choices [gdb_cmd "complete $command_line" 1]
@@ -642,7 +642,7 @@ body Console::_complete {} {
# METHOD: _reset_tab - Helper method for tab completion. Used
# to reset the tab when a key is pressed.
# ------------------------------------------------------------------
-body Console::_reset_tab {} {
+itcl::body Console::_reset_tab {} {
bind $_twin <KeyPress> {}
set _saw_tab 0
}
@@ -651,7 +651,7 @@ body Console::_reset_tab {} {
# ------------------------------------------------------------------
# METHOD: _set_wrap - Set wrap mode
# ------------------------------------------------------------------
-body Console::_set_wrap {wrap} {
+itcl::body Console::_set_wrap {wrap} {
if { $wrap } {
set hsm none
set wv char
@@ -667,7 +667,7 @@ body Console::_set_wrap {wrap} {
# ------------------------------------------------------------------
# METHOD: _update_option - Update in response to preference change
# ------------------------------------------------------------------
-body Console::_update_option {name value} {
+itcl::body Console::_update_option {name value} {
switch -- $name {
gdb/console/wrap {
_set_wrap $value
@@ -693,7 +693,7 @@ body Console::_update_option {name value} {
# NOTES: This will only run if env(GDBTK_TEST_RUNNING)==1.
# FOR TESTING ONLY
# ------------------------------------------------------------------
-body Console::test {args} {
+itcl::body Console::test {args} {
global env
if {[info exists env(GDBTK_TEST_RUNNING)] && $env(GDBTK_TEST_RUNNING) == 1} {
diff --git a/gdb/gdbtk/library/console.ith b/gdb/gdbtk/library/console.ith
index fc8971e9705..8bfd2ce367b 100644
--- a/gdb/gdbtk/library/console.ith
+++ b/gdb/gdbtk/library/console.ith
@@ -17,7 +17,7 @@
# blocks.
# ----------------------------------------------------------------------
-class Console {
+itcl::class Console {
inherit EmbeddedWin GDBEventHandler
public {
diff --git a/gdb/gdbtk/library/data.itb b/gdb/gdbtk/library/data.itb
index ba756753824..5cfc36b3faa 100644
--- a/gdb/gdbtk/library/data.itb
+++ b/gdb/gdbtk/library/data.itb
@@ -14,18 +14,18 @@
# ------------------------------------------------------------------
# Stack
# ------------------------------------------------------------------
-body Stack::constructor {} {
+itcl::body Stack::constructor {} {
set _stack {}
}
-body Stack::push {args} {
+itcl::body Stack::push {args} {
set _stack [concat $_stack $args]
}
-body Stack::destructor {} {
+itcl::body Stack::destructor {} {
}
-body Stack::pop {} {
+itcl::body Stack::pop {} {
set thing [lindex $_stack end]
set _stack [lreplace $_stack end end]
return $thing
@@ -34,13 +34,13 @@ body Stack::pop {} {
# ------------------------------------------------------------------
# Queue
# ------------------------------------------------------------------
-body Queue::constructor {} {
+itcl::body Queue::constructor {} {
}
-body Queue::destructor {} {
+itcl::body Queue::destructor {} {
}
-body Queue::pop {} {
+itcl::body Queue::pop {} {
set thing [lindex $_stack 0]
set _stack [lreplace $_stack 0 0]
return $thing
diff --git a/gdb/gdbtk/library/data.ith b/gdb/gdbtk/library/data.ith
index cf2e2c51e42..4b219e427a6 100644
--- a/gdb/gdbtk/library/data.ith
+++ b/gdb/gdbtk/library/data.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
# Generic Stack
-class Stack {
+itcl::class Stack {
public {
method constructor {}
@@ -29,7 +29,7 @@ class Stack {
}
# Generic Queue
-class Queue {
+itcl::class Queue {
inherit Stack
public {
diff --git a/gdb/gdbtk/library/debugwin.itb b/gdb/gdbtk/library/debugwin.itb
index 573dcbf12f1..7d9f06bf574 100644
--- a/gdb/gdbtk/library/debugwin.itb
+++ b/gdb/gdbtk/library/debugwin.itb
@@ -21,7 +21,7 @@
#
# ARGS: None are used yet.
# -----------------------------------------------------------------------------
-body DebugWin::constructor {args} {
+itcl::body DebugWin::constructor {args} {
debug $args
window_name "Insight Debug" "Debug"
@@ -37,7 +37,7 @@ body DebugWin::constructor {args} {
#
# ARGS: None
# -----------------------------------------------------------------------------
-body DebugWin::destructor {} {
+itcl::body DebugWin::destructor {} {
# notify debug code that window is going away
::debug::debugwin ""
}
@@ -51,7 +51,7 @@ body DebugWin::destructor {} {
# file, if it exists. Notifies the debug functions in ::debug
# to send output here.
# -----------------------------------------------------------------------------
-body DebugWin::build_win {} {
+itcl::body DebugWin::build_win {} {
global gdb_ImageDir GDBTK_LIBRARY
set top [winfo toplevel $itk_interior]
@@ -145,7 +145,7 @@ body DebugWin::build_win {} {
# func - function name of caller
# msg - message to display
# -----------------------------------------------------------------------------
-body DebugWin::puts {level cls func msg} {
+itcl::body DebugWin::puts {level cls func msg} {
# filter. check if we should display this message
# for now we always let high-level messages through
if {$level == "I"} {
@@ -197,7 +197,7 @@ body DebugWin::puts {level cls func msg} {
# func - function name
# ar - function arguments
# -----------------------------------------------------------------------------
-body DebugWin::put_trace {enter level func ar} {
+itcl::body DebugWin::put_trace {enter level func ar} {
set x [expr {$level * 2 - 2}]
if {$enter} {
$_t insert end "[string range $_bigstr 0 $x]$func " trace "$ar\n" args
@@ -215,7 +215,7 @@ body DebugWin::put_trace {enter level func ar} {
# DESC: Reads the contents of the debug log file, if it exists, into
# the DebugWin.
# -----------------------------------------------------------------------------
-body DebugWin::loadlog {} {
+itcl::body DebugWin::loadlog {} {
$_t delete 0.0 end
# Now load in log file, if possible.
# this is rather rude, using the logfile variable in the debug namespace
@@ -248,7 +248,7 @@ body DebugWin::loadlog {} {
#
# DESC: Re-sources all the .itb files.
# -----------------------------------------------------------------------------
-body DebugWin::_source_all {} {
+itcl::body DebugWin::_source_all {} {
foreach f [glob [file join $::GDBTK_LIBRARY *.itb]] {
source $f
}
@@ -261,7 +261,7 @@ body DebugWin::_source_all {} {
#
# DESC: Clears out the content of the debug window.
# -----------------------------------------------------------------------------
-body DebugWin::_clear {} {
+itcl::body DebugWin::_clear {} {
$_t delete 1.0 end
}
@@ -272,7 +272,7 @@ body DebugWin::_clear {} {
#
# DESC: Changes the background of the current contents of the window.
# -----------------------------------------------------------------------------
-body DebugWin::_mark_old {} {
+itcl::body DebugWin::_mark_old {} {
$_t tag add marked 1.0 "end - 1c"
}
@@ -283,7 +283,7 @@ body DebugWin::_mark_old {} {
#
# DESC: Changes the background of the current contents of the window.
# -----------------------------------------------------------------------------
-body DebugWin::_save_contents {} {
+itcl::body DebugWin::_save_contents {} {
set file [tk_getSaveFile -title "Choose debug window dump file" \
-parent [winfo toplevel $itk_interior]]
if {$file == ""} {
@@ -307,7 +307,7 @@ body DebugWin::_save_contents {} {
#
# DESC: Creates the Debug Window Options Dialog.
# -----------------------------------------------------------------------------
-body DebugWinDOpts::constructor {args} {
+itcl::body DebugWinDOpts::constructor {args} {
window_name "Debug Window Options"
build_win
eval itk_initialize $args
@@ -321,7 +321,7 @@ body DebugWinDOpts::constructor {args} {
#
# DESC: Destroys the Debug Window Options Dialog.
# -----------------------------------------------------------------------------
-body DebugWinDOpts::destructor {} {
+itcl::body DebugWinDOpts::destructor {} {
}
@@ -334,7 +334,7 @@ body DebugWinDOpts::destructor {} {
# user to select which information is displayed in the debug
# window and (eventually) how it looks.
# -----------------------------------------------------------------------------
-body DebugWinDOpts::build_win {} {
+itcl::body DebugWinDOpts::build_win {} {
wm title [winfo toplevel $itk_interior] "Debug Display Options"
# initialize here so we can resource this file and update the list
set _classes {DebugWin RegWin SrcBar SrcWin ToolBar WatchWin EmbeddedWin \
@@ -412,7 +412,7 @@ body DebugWinDOpts::build_win {} {
# DESC: Callback for selecting ALL classes. If the user selects ALL,
# deselect all the individual class checkbuttons.
# -----------------------------------------------------------------------------
-body DebugWinDOpts::_all {} {
+itcl::body DebugWinDOpts::_all {} {
switch $::gdbtk_de(filter_var) {
ALL {
set ::gdbtk_de(ALL) 1
@@ -457,7 +457,7 @@ body DebugWinDOpts::_all {} {
# log file through the new filter into the debug window. The
# button is disabled if there is no log file.
# -----------------------------------------------------------------------------
-body DebugWinDOpts::_apply { done } {
+itcl::body DebugWinDOpts::_apply { done } {
set dw [ManagedWin::find DebugWin]
debug $dw
if {$dw != ""} {
diff --git a/gdb/gdbtk/library/debugwin.ith b/gdb/gdbtk/library/debugwin.ith
index 9fb164cc72c..df173745f01 100644
--- a/gdb/gdbtk/library/debugwin.ith
+++ b/gdb/gdbtk/library/debugwin.ith
@@ -25,7 +25,7 @@
# This window is for developers.
#
# -----------------------------------------------------------------------------
-class DebugWin {
+itcl::class DebugWin {
inherit ManagedWin
private {
@@ -71,7 +71,7 @@ class DebugWin {
# This window is for developers.
#
# -----------------------------------------------------------------------------
-class DebugWinDOpts {
+itcl::class DebugWinDOpts {
inherit ManagedWin
public {
diff --git a/gdb/gdbtk/library/download.itb b/gdb/gdbtk/library/download.itb
index edbf8844215..afe3c1d599c 100644
--- a/gdb/gdbtk/library/download.itb
+++ b/gdb/gdbtk/library/download.itb
@@ -17,7 +17,7 @@
#
# ----------------------------------------------------------------------
-body Download::constructor {args} {
+itcl::body Download::constructor {args} {
global gdb_pretty_name
debug $args
eval itk_initialize $args
@@ -54,7 +54,7 @@ body Download::constructor {args} {
# ------------------------------------------------------------------
# METHOD: update_download - update the download meters
# ------------------------------------------------------------------
-body Download::update_download { sec num tot } {
+itcl::body Download::update_download { sec num tot } {
# Loop through all the sections, marking each as either done or
# updating its meter. This will mark all previous sections prior to
@@ -77,7 +77,7 @@ body Download::update_download { sec num tot } {
# ------------------------------------------------------------------
# METHOD: done - notification that the download is really complete
# ------------------------------------------------------------------
-body Download::done { {msg ""} } {
+itcl::body Download::done { {msg ""} } {
bell
if {$msg == ""} {
@@ -108,7 +108,7 @@ body Download::done { {msg ""} } {
# ------------------------------------------------------------------
# METHOD: cancel - cancel the download
# ------------------------------------------------------------------
-body Download::cancel {} {
+itcl::body Download::cancel {} {
debug "canceling the download"
set ::download_cancel_ok 1
}
@@ -116,15 +116,15 @@ body Download::cancel {} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body Download::destructor {} {
+itcl::body Download::destructor {} {
remove_hook download_progress_hook "$this update_download"
}
-body Download::do_download_hooks {} {
+itcl::body Download::do_download_hooks {} {
set ::download_timer(ok) 1
}
-body Download::download_hash { section num } {
+itcl::body Download::download_hash { section num } {
global download_timer
debug "sec=$section num=$num tot=$total_bytes ok=$::download_cancel_ok"
::update
@@ -145,7 +145,7 @@ body Download::download_hash { section num } {
}
# Download the executable. Return zero for success, and non-zero for error.
-body Download::download_it { } {
+itcl::body Download::download_it { } {
global gdb_exe_name gdb_downloading gdb_loaded
global gdb_target_name gdb_pretty_name
global gdb_running
diff --git a/gdb/gdbtk/library/download.ith b/gdb/gdbtk/library/download.ith
index 3fac5e5fed0..f50c3fef3b5 100644
--- a/gdb/gdbtk/library/download.ith
+++ b/gdb/gdbtk/library/download.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class Download {
+itcl::class Download {
inherit ManagedWin
protected {
diff --git a/gdb/gdbtk/library/ehandler.itb b/gdb/gdbtk/library/ehandler.itb
index bf95c0e9641..e949c988317 100644
--- a/gdb/gdbtk/library/ehandler.itb
+++ b/gdb/gdbtk/library/ehandler.itb
@@ -17,7 +17,7 @@
# method to call is stored in the event's
# "handler" method.
# ------------------------------------------------------------
-body GDBEventHandler::dispatch {event} {
+itcl::body GDBEventHandler::dispatch {event} {
set handler [$event handler]
diff --git a/gdb/gdbtk/library/ehandler.ith b/gdb/gdbtk/library/ehandler.ith
index a490fc7fc05..9eef9e12835 100644
--- a/gdb/gdbtk/library/ehandler.ith
+++ b/gdb/gdbtk/library/ehandler.ith
@@ -11,7 +11,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-class GDBEventHandler {
+itcl::class GDBEventHandler {
constructor {args} {}
destructor {}
diff --git a/gdb/gdbtk/library/embeddedwin.ith b/gdb/gdbtk/library/embeddedwin.ith
index 4474570f2f4..b1e54effd9c 100644
--- a/gdb/gdbtk/library/embeddedwin.ith
+++ b/gdb/gdbtk/library/embeddedwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class EmbeddedWin {
+itcl::class EmbeddedWin {
inherit ManagedWin
constructor {args} {
diff --git a/gdb/gdbtk/library/gdbevent.itb b/gdb/gdbtk/library/gdbevent.itb
index b781a8eecb6..12df232ab31 100644
--- a/gdb/gdbtk/library/gdbevent.itb
+++ b/gdb/gdbtk/library/gdbevent.itb
@@ -14,7 +14,7 @@
# ------------------------------------------------------------
# PUBLIC METHOD: get - Retrieve data about the event
# ------------------------------------------------------------
-body BreakpointEvent::get {what} {
+itcl::body BreakpointEvent::get {what} {
switch $what {
action { return $action }
@@ -40,7 +40,7 @@ body BreakpointEvent::get {what} {
# ------------------------------------------------------------
# PRIVATE METHOD: _init - Initialize all private data
# ------------------------------------------------------------
-body BreakpointEvent::_init {} {
+itcl::body BreakpointEvent::_init {} {
if {[catch {gdb_get_breakpoint_info $number} bpinfo]} {
set _file {}
set _function {}
@@ -75,14 +75,14 @@ body BreakpointEvent::_init {} {
# When the breakpoint number for the event changes,
# update the private data in the event.
-configbody BreakpointEvent::number {
+itcl::configbody BreakpointEvent::number {
_init
}
# ------------------------------------------------------------
# PUBLIC METHOD: get - Retrieve data about the event
# ------------------------------------------------------------
-body TracepointEvent::get {what} {
+itcl::body TracepointEvent::get {what} {
switch $what {
action { return $action }
@@ -105,7 +105,7 @@ body TracepointEvent::get {what} {
# ------------------------------------------------------------
# PRIVATE METHOD: _init - Initialize all private data
# ------------------------------------------------------------
-body TracepointEvent::_init {} {
+itcl::body TracepointEvent::_init {} {
if {[catch {gdb_get_tracepoint_info $number} tpinfo]} {
set _file {}
set _function {}
@@ -134,14 +134,14 @@ body TracepointEvent::_init {} {
# When the tracepoint number for the event changes,
# update the private data in the event.
-configbody TracepointEvent::number {
+itcl::configbody TracepointEvent::number {
_init
}
# ------------------------------------------------------------
# PUBLIC METHOD: get - Retrieve data about the event
# ------------------------------------------------------------
-body TracepointEvent::get {what} {
+itcl::body TracepointEvent::get {what} {
switch $what {
action { return $action }
@@ -164,7 +164,7 @@ body TracepointEvent::get {what} {
# ------------------------------------------------------------
# PUBLIC METHOD: get - Retrieve data about the event
# ------------------------------------------------------------
-body SetVariableEvent::get {what} {
+itcl::body SetVariableEvent::get {what} {
switch $what {
variable { return $variable }
@@ -177,7 +177,7 @@ body SetVariableEvent::get {what} {
# ------------------------------------------------------------
# CONSTRUCTOR: Create an UpdateEvent
# ------------------------------------------------------------
-body UpdateEvent::constructor {args} {
+itcl::body UpdateEvent::constructor {args} {
if {[catch {gdb_loc} loc]} {
dbug E "could not get current location: $loc"
} else {
@@ -189,7 +189,7 @@ body UpdateEvent::constructor {args} {
# ------------------------------------------------------------
# PUBLIC METHOD: get - Retrieve data about the event
# ------------------------------------------------------------
-body UpdateEvent::get {what} {
+itcl::body UpdateEvent::get {what} {
switch $what {
compile_filename { return $_compile_filename }
diff --git a/gdb/gdbtk/library/gdbevent.ith b/gdb/gdbtk/library/gdbevent.ith
index 596f2680fd5..a594ef54a2d 100644
--- a/gdb/gdbtk/library/gdbevent.ith
+++ b/gdb/gdbtk/library/gdbevent.ith
@@ -16,7 +16,7 @@
# will call the (empty) constructor in here instead of the one
# defined in the implementation file. Sigh.
-class GDBEvent {
+itcl::class GDBEvent {
public method get {what} { return "" }
public method handler {} { return "unknown" }
}
@@ -42,7 +42,7 @@ class GDBEvent {
# hit_count .... number of times BP has been hit
# user_specification
# .. text the user initially used to set this breakpoint
-class BreakpointEvent {
+itcl::class BreakpointEvent {
inherit GDBEvent
public variable action {}
@@ -95,7 +95,7 @@ class BreakpointEvent {
# thread ....... thread in which BP is set (or -1 for all threads)
# hit_count .... number of times BP has been hit
# actions ...... a list of actions to be performed when the tracepoint is hit
-class TracepointEvent {
+itcl::class TracepointEvent {
inherit GDBEvent
public variable action {}
@@ -137,7 +137,7 @@ class TracepointEvent {
#
# variable ..... the variable that was changed
# value ........ the variable's new value
-class SetVariableEvent {
+itcl::class SetVariableEvent {
inherit GDBEvent
public variable variable
@@ -157,7 +157,7 @@ class SetVariableEvent {
# This could happen when the inferior is executing or when the GUI
# is, for example, fetching memory from the target.
-class BusyEvent {
+itcl::class BusyEvent {
inherit GDBEvent
public method handler {} { return "busy" }
@@ -169,7 +169,7 @@ class BusyEvent {
# "busy". Receipt of this event means that the GUI should be put into
# a state to accept input by the user.
-class IdleEvent {
+itcl::class IdleEvent {
inherit GDBEvent
public method handler {} { return "idle" }
@@ -193,7 +193,7 @@ class IdleEvent {
#
# FIXME: Should probably put frame_pc and pc into different
# types of update events...
-class UpdateEvent {
+itcl::class UpdateEvent {
inherit GDBEvent
constructor {args} {}
@@ -213,7 +213,7 @@ class UpdateEvent {
#
# This event is posted whenever the target architecture changes
-class ArchChangedEvent {
+itcl::class ArchChangedEvent {
inherit GDBEvent
public method handler {} { return "arch_changed" }
diff --git a/gdb/gdbtk/library/gdbmenubar.itcl b/gdb/gdbtk/library/gdbmenubar.itcl
index cc6caa8ea07..0820cdc4853 100644
--- a/gdb/gdbtk/library/gdbmenubar.itcl
+++ b/gdb/gdbtk/library/gdbmenubar.itcl
@@ -28,7 +28,7 @@
#
# ----------------------------------------------------------------------
-class GDBMenuBar {
+itcl::class GDBMenuBar {
inherit itk::Widget
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/gdbtoolbar.itcl b/gdb/gdbtk/library/gdbtoolbar.itcl
index e09a6a99b63..1d3a78703a0 100644
--- a/gdb/gdbtk/library/gdbtoolbar.itcl
+++ b/gdb/gdbtk/library/gdbtoolbar.itcl
@@ -28,7 +28,7 @@
#
# ----------------------------------------------------------------------
-class GDBToolBar {
+itcl::class GDBToolBar {
inherit itk::Widget
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/gdbwin.ith b/gdb/gdbtk/library/gdbwin.ith
index fa4151be036..661578d1946 100644
--- a/gdb/gdbtk/library/gdbwin.ith
+++ b/gdb/gdbtk/library/gdbwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class GDBWin {
+itcl::class GDBWin {
inherit GDBEventHandler
constructor {args} {
diff --git a/gdb/gdbtk/library/globalpref.itb b/gdb/gdbtk/library/globalpref.itb
index 87db1cc6512..7b29ff15dea 100644
--- a/gdb/gdbtk/library/globalpref.itb
+++ b/gdb/gdbtk/library/globalpref.itb
@@ -20,7 +20,7 @@
# ------------------------------------------------------------------
# METHOD: _init - set up the tracing labels info
# ------------------------------------------------------------------
-body GlobalPref::_init {} {
+itcl::body GlobalPref::_init {} {
if {$inited} {
return
}
@@ -43,7 +43,7 @@ body GlobalPref::_init {} {
# ------------------------------------------------------------------
# METHOD: init_var - initialize preference variables
# ------------------------------------------------------------------
-body GlobalPref::_init_var {} {
+itcl::body GlobalPref::_init_var {} {
set vlist {gdb/ImageDir gdb/console/wrap gdb/mode
gdb/help/browser gdb/use_icons}
@@ -56,7 +56,7 @@ body GlobalPref::_init_var {} {
# ------------------------------------------------------------------
# METHOD: constructor - create the Global Preferences object
# ------------------------------------------------------------------
-body GlobalPref::constructor {args} {
+itcl::body GlobalPref::constructor {args} {
window_name "Global Preferences"
_init
_init_var
@@ -67,7 +67,7 @@ body GlobalPref::constructor {args} {
# ------------------------------------------------------------------
# METHOD: destructor - destroy the Global Preferences object
# ------------------------------------------------------------------
-body GlobalPref::destructor {} {
+itcl::body GlobalPref::destructor {} {
foreach thunk $_fonts {
font delete test-$thunk-font
}
@@ -76,7 +76,7 @@ body GlobalPref::destructor {} {
# ------------------------------------------------------------------
# METHOD: _build_win - build the dialog
# ------------------------------------------------------------------
-body GlobalPref::_build_win {} {
+itcl::body GlobalPref::_build_win {} {
global tcl_platform GDBTK_LIBRARY
debug
frame $itk_interior.f
@@ -262,7 +262,7 @@ body GlobalPref::_build_win {} {
# ------------------------------------------------------------------
# PRIVATE METHOD: _make_font_item
# ------------------------------------------------------------------
-body GlobalPref::_make_font_item {f name label font_list} {
+itcl::body GlobalPref::_make_font_item {f name label font_list} {
# create ComboBox with font name
lappend _fonts $name
@@ -297,7 +297,7 @@ body GlobalPref::_make_font_item {f name label font_list} {
# ------------------------------------------------------------------
# PRIVATE METHOD: _resize_font_item_height
# ------------------------------------------------------------------
-body GlobalPref::_resize_font_item_height {} {
+itcl::body GlobalPref::_resize_font_item_height {} {
foreach font $_fonts {
set master [$itk_interior.f.d get_frame]
set row [gridCGet $master.${font}l -row]
@@ -308,7 +308,7 @@ body GlobalPref::_resize_font_item_height {} {
# ------------------------------------------------------------------
# PRIVATE METHOD: _change_icons
# ------------------------------------------------------------------
-body GlobalPref::_change_icons {w args} {
+itcl::body GlobalPref::_change_icons {w args} {
debug
set index [$w list curselection]
if {$index != ""} {
@@ -330,7 +330,7 @@ body GlobalPref::_change_icons {w args} {
# NOTES: The combobox has a really non-standard callback
# mechanism: it always adds two args to the callback.
# ------------------------------------------------------------------
-body GlobalPref::_change_font {font stupid implementation} {
+itcl::body GlobalPref::_change_font {font stupid implementation} {
font configure test-$font-font -family $implementation
}
@@ -345,7 +345,7 @@ body GlobalPref::_change_font {font stupid implementation} {
#
# NOTES: See comments for purpose of "direction". Sigh.
# ------------------------------------------------------------------
-body GlobalPref::_change_size {direction font} {
+itcl::body GlobalPref::_change_size {direction font} {
# Almost as stupid as the comobox, the iwidgets::spinint class
# will not treat its -increment and -decrement commands
@@ -356,7 +356,7 @@ body GlobalPref::_change_size {direction font} {
}
-body GlobalPref::_toggle_tracing {win} {
+itcl::body GlobalPref::_toggle_tracing {win} {
debug
$win configure -text $tracing_labels($_new(gdb/mode))
}
@@ -364,14 +364,14 @@ body GlobalPref::_toggle_tracing {win} {
# ------------------------------------------------------------------
# METHOD: _ok - called to accept settings and close dialog
# ------------------------------------------------------------------
-body GlobalPref::_ok {} {
+itcl::body GlobalPref::_ok {} {
_apply 1
}
# ------------------------------------------------------------------
# METHOD: _apply - apply current settings to the screen
# ------------------------------------------------------------------
-body GlobalPref::_apply {{deleteMe 0}} {
+itcl::body GlobalPref::_apply {{deleteMe 0}} {
debug
set changed_something 0
@@ -425,7 +425,7 @@ body GlobalPref::_apply {{deleteMe 0}} {
# METHOD: _cancel - forget current settings -- reset to original
# state and close preferences
# ------------------------------------------------------------------
-body GlobalPref::_cancel {} {
+itcl::body GlobalPref::_cancel {} {
debug
set changed_something 0
@@ -465,7 +465,7 @@ body GlobalPref::_cancel {} {
# The cancel method is actually called when
# the window is closed. Name needs fixed.
# ------------------------------------------------------------------
-body GlobalPref::cancel {} {
+itcl::body GlobalPref::cancel {} {
# when the window is closed, we want the preferences selected to
# be applied.
_apply 1
diff --git a/gdb/gdbtk/library/globalpref.ith b/gdb/gdbtk/library/globalpref.ith
index 799625c9b6d..d002c2392c8 100644
--- a/gdb/gdbtk/library/globalpref.ith
+++ b/gdb/gdbtk/library/globalpref.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class GlobalPref {
+itcl::class GlobalPref {
inherit ManagedWin ModalDialog
private {
diff --git a/gdb/gdbtk/library/helpviewer.itb b/gdb/gdbtk/library/helpviewer.itb
index a366b689979..3ee506a996b 100644
--- a/gdb/gdbtk/library/helpviewer.itb
+++ b/gdb/gdbtk/library/helpviewer.itb
@@ -22,7 +22,7 @@
# DESC:
# Creates the Help Viewer window.
# -----------------------------------------------------------------------------
-body HtmlViewer::constructor {args} {
+itcl::body HtmlViewer::constructor {args} {
window_name "Help"
eval itk_initialize $args
_buildwin
@@ -42,7 +42,7 @@ body HtmlViewer::constructor {args} {
# Finally it loads help/index.html. This last step should change if
# this widget is ever used for anything but help.
# -----------------------------------------------------------------------------
-body HtmlViewer::_buildwin {} {
+itcl::body HtmlViewer::_buildwin {} {
global GDBTK_LIBRARY gdb_ImageDir
set _links [PageStack \#auto]
@@ -92,7 +92,7 @@ body HtmlViewer::_buildwin {} {
# SYNOPSIS: push val
# DESC: Pushes a value onto the stack.
# -----------------------------------------------------------------------------
-body PageStack::push {val} {
+itcl::body PageStack::push {val} {
incr _ptr
incr _max
if {$_ptr < $_max} {
@@ -107,7 +107,7 @@ body PageStack::push {val} {
# DESC: Moves the stack pointer back by one.
# RETURNS: Returns the value on the stack, or 0 on error.
# -----------------------------------------------------------------------------
-body PageStack::back {} {
+itcl::body PageStack::back {} {
if {$_ptr > 0} {
incr _ptr -1
return $_stack($_ptr)
@@ -121,7 +121,7 @@ body PageStack::back {} {
# DESC: Moves the stack pointer forward by one.
# RETURNS: Returns the value on the stack, or 0 on error.
# -----------------------------------------------------------------------------
-body PageStack::next {} {
+itcl::body PageStack::next {} {
if {$_ptr < $_max} {
incr _ptr
return $_stack($_ptr)
@@ -135,7 +135,7 @@ body PageStack::next {} {
# DESC: Indicates if the stack pointer is not at the top.
# RETURNS: Returns 1 if PageStack::next will suceed, 0 otherwise.
# -----------------------------------------------------------------------------
-body PageStack::more {} {
+itcl::body PageStack::more {} {
if {$_ptr < $_max} {
return 1
}
@@ -148,7 +148,7 @@ body PageStack::more {} {
# DESC: Indicates if the stack pointer is not at the bottom of stack.
# RETURNS: Returns 1 if PageStack::back will suceed, 0 otherwise.
# -----------------------------------------------------------------------------
-body PageStack::less {} {
+itcl::body PageStack::less {} {
if {$_ptr > 0} {
return 1
}
@@ -160,7 +160,7 @@ body PageStack::less {} {
# SYNOPSIS: current
# RETURNS: Returns the current value on the stack.
# -----------------------------------------------------------------------------
-body PageStack::current {} {
+itcl::body PageStack::current {} {
if {$_ptr > 0} {
return $_stack($_ptr)
}
@@ -183,7 +183,7 @@ body PageStack::current {} {
# "fore", and "home"
#
# ------------------------------------------------------------------------------
-body HtmlViewer::_enable { on args } {
+itcl::body HtmlViewer::_enable { on args } {
if {$on} {
set state normal
} else {
@@ -216,7 +216,7 @@ body HtmlViewer::_enable { on args } {
# SYNOPSIS: back
# DESC: Moves to the previous page
# ------------------------------------------------------------------------------
-body HtmlViewer::back {} {
+itcl::body HtmlViewer::back {} {
set res [$_links back]
if {$res != 0} {
load $res
@@ -231,7 +231,7 @@ body HtmlViewer::back {} {
# SYNOPSIS: forward
# DESC: Moves to the next page
# ------------------------------------------------------------------------------
-body HtmlViewer::forward {} {
+itcl::body HtmlViewer::forward {} {
set res [$_links next]
if {$res != 0} {
load $res
@@ -247,7 +247,7 @@ body HtmlViewer::forward {} {
# ARDS: page - link to the page to load
# DESC: Saves the page on the stack and calls the "load" method
# ------------------------------------------------------------------------------
-body HtmlViewer::link {page} {
+itcl::body HtmlViewer::link {page} {
if {$page != [$_links current]} {
$_links push $page
load $page
@@ -264,7 +264,7 @@ body HtmlViewer::link {page} {
# the html widget, then resets cursor and enables the menus
# and buttons
# ------------------------------------------------------------------------------
-body HtmlViewer::load {link} {
+itcl::body HtmlViewer::load {link} {
_enable 0 back fore home
$itk_interior configure -cursor watch
$_html import -link $link
@@ -278,7 +278,7 @@ body HtmlViewer::load {link} {
# DESC: If the prefs are set to use a browser, attempts
# to do so. Otherwise, uses builtin HtmlViewer class.
# ------------------------------------------------------------------------------
-body HtmlViewer::open_help {hfile} {
+itcl::body HtmlViewer::open_help {hfile} {
set link file://[file join $::GDBTK_LIBRARY help $hfile]
if {![pref get gdb/help/browser] || ![::open_url $link]} {
ManagedWin::open HtmlViewer -file $hfile
diff --git a/gdb/gdbtk/library/helpviewer.ith b/gdb/gdbtk/library/helpviewer.ith
index 1959a718227..8a120f7813f 100644
--- a/gdb/gdbtk/library/helpviewer.ith
+++ b/gdb/gdbtk/library/helpviewer.ith
@@ -25,7 +25,7 @@
# Currently used as a help window.
#
# -----------------------------------------------------------------------------
-class HtmlViewer {
+itcl::class HtmlViewer {
inherit EmbeddedWin
public {
@@ -80,7 +80,7 @@ class HtmlViewer {
# Currently used by the HtmlViewer class.
#
# -----------------------------------------------------------------------------
-class PageStack {
+itcl::class PageStack {
private {
variable _ptr -1
variable _max -1
diff --git a/gdb/gdbtk/library/kod.itb b/gdb/gdbtk/library/kod.itb
index f9121d4c24b..3140733d483 100644
--- a/gdb/gdbtk/library/kod.itb
+++ b/gdb/gdbtk/library/kod.itb
@@ -18,7 +18,7 @@
# ------------------------------------------------------------------
# CONSTRUCTOR - create new process window
# ------------------------------------------------------------------
-body KodWin::constructor {args} {
+itcl::body KodWin::constructor {args} {
#
# Create a window with the same name as this object
#
@@ -36,7 +36,7 @@ body KodWin::constructor {args} {
# ------------------------------------------------------------------
# METHOD: build_win - build the main KOD window
# ------------------------------------------------------------------
-body KodWin::build_win {} {
+itcl::body KodWin::build_win {} {
# FIXME: rename this variable.
global kodActivePane
@@ -149,7 +149,7 @@ body KodWin::build_win {} {
# ------------------------------------------------------------------
# METHOD: update - update widget when something changes
# ------------------------------------------------------------------
-body KodWin::update {event} {
+itcl::body KodWin::update {event} {
debug "updating kod window"
@@ -168,7 +168,7 @@ body KodWin::update {event} {
# We get here from a press on the Display button or
# from a <Double-1> on a line of the list of objects
# ------------------------------------------------------------------
-body KodWin::display {} {
+itcl::body KodWin::display {} {
upvar \#0 $this table_vals
if {!$Running && [$lf.s cget -rows] > 1} {
gdbtk_busy
@@ -188,7 +188,7 @@ body KodWin::display {} {
# ------------------------------------------------------------------
# METHOD: display_list - display list of objects
# ------------------------------------------------------------------
-body KodWin::display_list {} {
+itcl::body KodWin::display_list {} {
upvar \#0 $this table_vals
debug "displaying list of objects"
@@ -276,7 +276,7 @@ body KodWin::display_list {} {
# When called from update we have to reissue the gdb
# command to get fresh data
# ------------------------------------------------------------------
-body KodWin::display_object {{cmd ""} {obj ""}} {
+itcl::body KodWin::display_object {{cmd ""} {obj ""}} {
debug "Displaying object details..."
upvar $obj objects
global kodActivePane
@@ -343,7 +343,7 @@ body KodWin::display_object {{cmd ""} {obj ""}} {
# ------------------------------------------------------------------
# METHOD: clear - clear detail panes and reset pane selection
# ------------------------------------------------------------------
-body KodWin::clear {} {
+itcl::body KodWin::clear {} {
debug "going to clear detail panes and pane selection"
$t1 configure -state normal
$t2 configure -state normal
@@ -361,7 +361,7 @@ body KodWin::clear {} {
# ------------------------------------------------------------------
# METHOD: top - go to the list of types of objects (top level)
# ------------------------------------------------------------------
-body KodWin::top {} {
+itcl::body KodWin::top {} {
debug "going to top from level $level"
if {$level > 0} {
set level 0
@@ -372,7 +372,7 @@ body KodWin::top {} {
# ------------------------------------------------------------------
# METHOD: up - go to the list of objects which led to the current one
# ------------------------------------------------------------------
-body KodWin::up {} {
+itcl::body KodWin::up {} {
debug "going up from level $level..."
if {$level > 0} {
incr level -1
@@ -384,7 +384,7 @@ body KodWin::up {} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body KodWin::destructor {} {
+itcl::body KodWin::destructor {} {
upvar \#0 $this table_vals $this-pane1 pane1_vals $this-pane2 pane2_vals
global kodActivePane
@@ -398,7 +398,7 @@ body KodWin::destructor {} {
# PUBLIC METHOD: set_variable - called when user runs `set os'
# command
# ------------------------------------------------------------------
-body KodWin::set_variable {event} {
+itcl::body KodWin::set_variable {event} {
set value [$event get value]
if {[$event get variable] == "os" && $value != ""} {
@@ -411,7 +411,7 @@ body KodWin::set_variable {event} {
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body KodWin::reconfig {} {
+itcl::body KodWin::reconfig {} {
destroy $itk_interior.bf
destroy $titl
build_win
@@ -424,7 +424,7 @@ body KodWin::reconfig {} {
# - clicks in the window
# - change mouse pointer
# ------------------------------------------------------------------
-body KodWin::busy {event} {
+itcl::body KodWin::busy {event} {
set Running 1
_disable_buttons
cursor watch
@@ -434,7 +434,7 @@ body KodWin::busy {event} {
# METHOD: idle - idle event handler. Run when the target is not
# running
# ------------------------------------------------------------------
-body KodWin::idle {event} {
+itcl::body KodWin::idle {event} {
set Running 0
_restore_buttons
cursor {}
@@ -445,7 +445,7 @@ body KodWin::idle {event} {
# This is a convenience method which simply sets the mouse
# pointer to the given glyph.
# ------------------------------------------------------------------
-body KodWin::cursor {glyph} {
+itcl::body KodWin::cursor {glyph} {
$_top configure -cursor $glyph
}
@@ -453,7 +453,7 @@ body KodWin::cursor {glyph} {
# PRIVATE METHOD: _disable_buttons - disable all buttons
# Used when we are busy and can't take another event
# ------------------------------------------------------------------
-body KodWin::_disable_buttons {} {
+itcl::body KodWin::_disable_buttons {} {
$BTop configure -state disabled
$BUp configure -state disabled
$BDisplay configure -state disabled
@@ -465,7 +465,7 @@ body KodWin::_disable_buttons {} {
# previous states.
# Used when we are busy and can't take another event
# ------------------------------------------------------------------
-body KodWin::_restore_buttons {} {
+itcl::body KodWin::_restore_buttons {} {
$BTop configure -state $BState(BTop)
$BUp configure -state $BState(BUp)
$BDisplay configure -state $BState(BDisplay)
diff --git a/gdb/gdbtk/library/kod.ith b/gdb/gdbtk/library/kod.ith
index 8827deb5f0c..f2dfefb3cdf 100644
--- a/gdb/gdbtk/library/kod.ith
+++ b/gdb/gdbtk/library/kod.ith
@@ -11,7 +11,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-class KodWin {
+itcl::class KodWin {
inherit EmbeddedWin GDBWin
private {
diff --git a/gdb/gdbtk/library/locals.tcl b/gdb/gdbtk/library/locals.tcl
index 64daaf87ff9..1af84abc5f2 100644
--- a/gdb/gdbtk/library/locals.tcl
+++ b/gdb/gdbtk/library/locals.tcl
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class LocalsWin {
+itcl::class LocalsWin {
inherit VariableWin
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/managedwin.itb b/gdb/gdbtk/library/managedwin.itb
index feb405ee296..dcf4989bfb5 100644
--- a/gdb/gdbtk/library/managedwin.itb
+++ b/gdb/gdbtk/library/managedwin.itb
@@ -15,7 +15,7 @@
# ------------------------------------------------------------
# PUBLIC METHOD: constructor
# ------------------------------------------------------------
-body ManagedWin::constructor {args} {
+itcl::body ManagedWin::constructor {args} {
#debug "$this args=$args"
set _top [winfo toplevel $itk_interior]
}
@@ -23,7 +23,7 @@ body ManagedWin::constructor {args} {
# ------------------------------------------------------------
# PUBLIC METHOD: destructor
# ------------------------------------------------------------
-body ManagedWin::destructor {} {
+itcl::body ManagedWin::destructor {} {
# If no toplevels remain, quit. However, check the quit_if_last
# flag since we might be doing something like displaying a
# splash screen at startup...
@@ -39,7 +39,7 @@ body ManagedWin::destructor {} {
# PUBLIC METHOD: window_name - Set the name of the window
# (and optionally its icon's name).
# ------------------------------------------------------------
-body ManagedWin::window_name {wname {iname ""}} {
+itcl::body ManagedWin::window_name {wname {iname ""}} {
wm title $_top $wname
if {$iname != ""} {
wm iconname $_top $iname
@@ -53,14 +53,14 @@ body ManagedWin::window_name {wname {iname ""}} {
# method. It returns a command that can be used to recreate
# this particular window.
# ------------------------------------------------------------
-body ManagedWin::pickle {} {
+itcl::body ManagedWin::pickle {} {
return [list ManagedWin::open [namespace tail [info class]]]
}
# ------------------------------------------------------------
# PUBLIC METHOD: reveal
# ------------------------------------------------------------
-body ManagedWin::reveal {} {
+itcl::body ManagedWin::reveal {} {
# Do this update to flush all changes before deiconifying the window.
update idletasks
@@ -94,7 +94,7 @@ body ManagedWin::reveal {} {
# ------------------------------------------------------------
# PUBLIC PROC: restart
# ------------------------------------------------------------
-body ManagedWin::restart {} {
+itcl::body ManagedWin::restart {} {
# This is needed in case we've called "gdbtk_busy" before the restart.
# This will configure the stop/run button as necessary
after idle gdbtk_idle
@@ -112,7 +112,7 @@ body ManagedWin::restart {} {
# the preferences file, so they can be restored at startup.
# FIXME: Currently assumes only ONE window per type...
# ------------------------------------------------------------------
-body ManagedWin::shutdown {} {
+itcl::body ManagedWin::shutdown {} {
set activeWins {}
foreach win [itcl_info objects -isa ManagedWin] {
if {![$win isa ModalDialog] && ![$win _ignore_on_save]} {
@@ -129,7 +129,7 @@ body ManagedWin::shutdown {} {
# opened at shutdown.
# FIXME: Currently assumes only ONE window per type...
# ------------------------------------------------------------------
-body ManagedWin::startup {} {
+itcl::body ManagedWin::startup {} {
debug "Got active list [pref get gdb/window/active]"
foreach cmd [pref get gdb/window/active] {
@@ -150,7 +150,7 @@ body ManagedWin::startup {} {
# ------------------------------------------------------------
# PUBLIC PROC: open_dlg
# ------------------------------------------------------------
-body ManagedWin::open_dlg {class args} {
+itcl::body ManagedWin::open_dlg {class args} {
set newwin [eval _open $class $args]
if {$newwin != ""} {
@@ -162,7 +162,7 @@ body ManagedWin::open_dlg {class args} {
# ------------------------------------------------------------
# PUBLIC PROC: open
# ------------------------------------------------------------
-body ManagedWin::open {class args} {
+itcl::body ManagedWin::open {class args} {
set newwin [eval _open $class $args]
if {$newwin != ""} {
@@ -180,7 +180,7 @@ body ManagedWin::open {class args} {
# ------------------------------------------------------------
# PRIVATE PROC: _open
# ------------------------------------------------------------
-body ManagedWin::_open { class args } {
+itcl::body ManagedWin::_open { class args } {
debug "$class $args"
parse_args force
@@ -202,7 +202,7 @@ body ManagedWin::_open { class args } {
# ------------------------------------------------------------
# PRIVATE PROC: _create
# ------------------------------------------------------------
-body ManagedWin::_create { class args } {
+itcl::body ManagedWin::_create { class args } {
set win [string tolower $class]
debug "win=$win args=$args"
@@ -327,7 +327,7 @@ body ManagedWin::_create { class args } {
# ------------------------------------------------------------
# PUBLIC PROC: find
# ------------------------------------------------------------
-body ManagedWin::find { win } {
+itcl::body ManagedWin::find { win } {
debug "$win"
set res ""
foreach obj [itcl_info objects -isa ManagedWin] {
@@ -341,7 +341,7 @@ body ManagedWin::find { win } {
# ------------------------------------------------------------
# PUBLIC PROC: init
# ------------------------------------------------------------
-body ManagedWin::init {} {
+itcl::body ManagedWin::init {} {
wm withdraw .
set _screenheight [winfo screenheight .]
set _screenwidth [winfo screenwidth .]
@@ -350,14 +350,14 @@ body ManagedWin::init {} {
# ------------------------------------------------------------
# PUBLIC METHOD: destroy_toplevel
# ------------------------------------------------------------
-body ManagedWin::destroy_toplevel {} {
+itcl::body ManagedWin::destroy_toplevel {} {
after idle "update idletasks;destroy $_top"
}
# ------------------------------------------------------------
# PROTECTED METHOD: _freeze_me
# ------------------------------------------------------------
-body ManagedWin::_freeze_me {} {
+itcl::body ManagedWin::_freeze_me {} {
$_top configure -cursor watch
::update idletasks
}
@@ -365,7 +365,7 @@ body ManagedWin::_freeze_me {} {
# ------------------------------------------------------------
# PROTECTED METHOD: _thaw_me
# ------------------------------------------------------------
-body ManagedWin::_thaw_me {} {
+itcl::body ManagedWin::_thaw_me {} {
$_top configure -cursor {}
::update idletasks
@@ -375,7 +375,7 @@ body ManagedWin::_thaw_me {} {
# PRIVATE PROC: _make_icon_window - create a small window with an
# icon in it for use by certain Unix window managers.
# ------------------------------------------------------------------
-body ManagedWin::_make_icon_window {name {file "gdbtk_icon"}} {
+itcl::body ManagedWin::_make_icon_window {name {file "gdbtk_icon"}} {
if {![winfo exists $name]} {
toplevel $name
label $name.im -image \
diff --git a/gdb/gdbtk/library/managedwin.ith b/gdb/gdbtk/library/managedwin.ith
index 7a024c67a38..f4a16c97c30 100644
--- a/gdb/gdbtk/library/managedwin.ith
+++ b/gdb/gdbtk/library/managedwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class ManagedWin {
+itcl::class ManagedWin {
inherit itk::Widget
public {
diff --git a/gdb/gdbtk/library/mempref.itb b/gdb/gdbtk/library/mempref.itb
index 7da5d88ebd7..7ddece86bbd 100644
--- a/gdb/gdbtk/library/mempref.itb
+++ b/gdb/gdbtk/library/mempref.itb
@@ -15,7 +15,7 @@
# ------------------------------------------------------------------
# METHOD: constructor - build the dialog
# ------------------------------------------------------------------
-body MemPref::constructor {args} {
+itcl::body MemPref::constructor {args} {
window_name "Memory Preferences"
@@ -57,14 +57,14 @@ body MemPref::constructor {args} {
# ------------------------------------------------------------------
# METHOD: destructor - destroy the dialog
# ------------------------------------------------------------------
-body MemPref::destructor {} {
+itcl::body MemPref::destructor {} {
trace vdelete [scope gnumbytes] w [code $this check_numbytes]
}
# ------------------------------------------------------------------
# METHOD: build_win - build the dialog
# ------------------------------------------------------------------
-body MemPref::build_win {} {
+itcl::body MemPref::build_win {} {
frame $itk_interior.f
set f [frame $itk_interior.f.a]
@@ -205,7 +205,7 @@ body MemPref::build_win {} {
# ------------------------------------------------------------------
# METHOD: busy - make the widget unusable
# ------------------------------------------------------------------
-body MemPref::busy {} {
+itcl::body MemPref::busy {} {
set top [winfo toplevel $itk_interior]
$top configure -cursor watch
@@ -221,7 +221,7 @@ body MemPref::busy {} {
# ------------------------------------------------------------------
# METHOD: idle - make the widget useable
# ------------------------------------------------------------------
-body MemPref::idle {} {
+itcl::body MemPref::idle {} {
set top [winfo toplevel $itk_interior]
$top configure -cursor {}
@@ -233,7 +233,7 @@ body MemPref::idle {} {
# ------------------------------------------------------------------
# METHOD: ok - apply and quit
# ------------------------------------------------------------------
-body MemPref::ok {} {
+itcl::body MemPref::ok {} {
apply
unpost
}
@@ -241,14 +241,14 @@ body MemPref::ok {} {
# ------------------------------------------------------------------
# METHOD: cancel - just close the dialog w/o saving changes
# ------------------------------------------------------------------
-body MemPref::cancel {} {
+itcl::body MemPref::cancel {} {
unpost
}
# ------------------------------------------------------------------
# METHOD: check_numbytes - a trace to make sure gnumbytes is an int > 0
# ------------------------------------------------------------------
-body MemPref::check_numbytes {var index mode} {
+itcl::body MemPref::check_numbytes {var index mode} {
upvar \#0 $var true
if {($true != "") && ([catch {expr {(int($true) != double($true)) || $true <= 0}} val]
|| $val)} {
@@ -262,7 +262,7 @@ body MemPref::check_numbytes {var index mode} {
# ------------------------------------------------------------------
# METHOD: set_bytes_per_row - combobox callback to set the bytes per row
# ------------------------------------------------------------------
-body MemPref::set_bytes_per_row {w value} {
+itcl::body MemPref::set_bytes_per_row {w value} {
set gbpr $value
}
@@ -270,7 +270,7 @@ body MemPref::set_bytes_per_row {w value} {
# METHOD: toggle_size_control - toggle the state of the entry box as the
# control method changes
# ------------------------------------------------------------------
-body MemPref::toggle_size_control {} {
+itcl::body MemPref::toggle_size_control {} {
if {$gvar} {
$Widgets(e-numbytes) configure -state normal \
@@ -286,7 +286,7 @@ body MemPref::toggle_size_control {} {
# ------------------------------------------------------------------
# METHOD: apply - apply changes to the parent window
# ------------------------------------------------------------------
-body MemPref::apply {} {
+itcl::body MemPref::apply {} {
busy
gdbtk_busy
@@ -336,7 +336,7 @@ body MemPref::apply {} {
# ------------------------------------------------------------------
# METHOD: enable_format - turn on the format radio buttons
# ------------------------------------------------------------------
-body MemPref::enable_format {} {
+itcl::body MemPref::enable_format {} {
if {!$format_disabled} {
return
}
@@ -351,7 +351,7 @@ body MemPref::enable_format {} {
# ------------------------------------------------------------------
# METHOD: disable_format - turn off the format radio buttons
# ------------------------------------------------------------------
-body MemPref::disable_format {} {
+itcl::body MemPref::disable_format {} {
if {$format_disabled} {
return
}
@@ -365,7 +365,7 @@ body MemPref::disable_format {} {
# ------------------------------------------------------------------
# METHOD: pick - pick colors
# ------------------------------------------------------------------
-body MemPref::pick {lab} {
+itcl::body MemPref::pick {lab} {
set new_color [tk_chooseColor -initialcolor $color -title "Choose color"]
if {$new_color != $color && $new_color != ""} {
set color $new_color
@@ -377,7 +377,7 @@ body MemPref::pick {lab} {
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body MemPref::reconfig {} {
+itcl::body MemPref::reconfig {} {
# for now, just delete and recreate
destroy $itk_interior.f
build_win
diff --git a/gdb/gdbtk/library/mempref.ith b/gdb/gdbtk/library/mempref.ith
index 77c62a3670a..0b43ef1a69f 100644
--- a/gdb/gdbtk/library/mempref.ith
+++ b/gdb/gdbtk/library/mempref.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class MemPref {
+itcl::class MemPref {
inherit ModalDialog ManagedWin
public {
diff --git a/gdb/gdbtk/library/memwin.itb b/gdb/gdbtk/library/memwin.itb
index 07c6f31c93c..2ef3c1a0211 100644
--- a/gdb/gdbtk/library/memwin.itb
+++ b/gdb/gdbtk/library/memwin.itb
@@ -14,7 +14,7 @@
# ------------------------------------------------------------------
# METHOD: constructor - build the dialog
# ------------------------------------------------------------------
-body MemWin::constructor {args} {
+itcl::body MemWin::constructor {args} {
global _mem
debug $args
eval itk_initialize $args
@@ -52,7 +52,7 @@ body MemWin::constructor {args} {
# ------------------------------------------------------------------
# METHOD: destructor - destroy the dialog
# ------------------------------------------------------------------
-body MemWin::destructor {} {
+itcl::body MemWin::destructor {} {
if {[winfo exists $prefs_win]} {
$prefs_win cancel
}
@@ -62,7 +62,7 @@ body MemWin::destructor {} {
# ------------------------------------------------------------------
# METHOD: build_win - build the main memory window
# ------------------------------------------------------------------
-body MemWin::build_win {} {
+itcl::body MemWin::build_win {} {
global tcl_platform gdb_ImageDir _mem ${this}_memval
set maxlen 0
@@ -214,21 +214,21 @@ body MemWin::build_win {} {
# ------------------------------------------------------------------
# METHOD: paste - paste callback. Update cell contents after paste
# ------------------------------------------------------------------
-body MemWin::paste {x y} {
+itcl::body MemWin::paste {x y} {
edit [$itk_component(table) index @$x,$y]
}
# ------------------------------------------------------------------
# METHOD: validate - because the control widget wants this
# ------------------------------------------------------------------
-body MemWin::validate {val} {
+itcl::body MemWin::validate {val} {
return $val
}
# ------------------------------------------------------------------
# METHOD: create_prefs - create memory preferences dialog
# ------------------------------------------------------------------
-body MemWin::create_prefs {} {
+itcl::body MemWin::create_prefs {} {
if {$Running} { return }
# make sure row height is set
@@ -246,7 +246,7 @@ body MemWin::create_prefs {} {
# ------------------------------------------------------------------
# METHOD: changed_cell - called when moving from one cell to another
# ------------------------------------------------------------------
-body MemWin::changed_cell {from to} {
+itcl::body MemWin::changed_cell {from to} {
#debug "moved from $from to $to"
#debug "value = [$itk_component(table) get $from]"
if {$saved_value != ""} {
@@ -260,7 +260,7 @@ body MemWin::changed_cell {from to} {
# ------------------------------------------------------------------
# METHOD: edit - edit a cell
# ------------------------------------------------------------------
-body MemWin::edit { cell } {
+itcl::body MemWin::edit { cell } {
global _mem ${this}_memval
#debug "edit $cell"
@@ -344,7 +344,7 @@ body MemWin::edit { cell } {
# ------------------------------------------------------------------
# METHOD: toggle_enabled - called when enable is toggled
# ------------------------------------------------------------------
-body MemWin::toggle_enabled {} {
+itcl::body MemWin::toggle_enabled {} {
global _mem
if {$Running} { return }
@@ -362,7 +362,7 @@ body MemWin::toggle_enabled {} {
# ------------------------------------------------------------------
# METHOD: update - update widget after every PC change
# ------------------------------------------------------------------
-body MemWin::update {event} {
+itcl::body MemWin::update {event} {
global _mem
if {$_mem($this,enabled)} {
_update_address 0
@@ -372,7 +372,7 @@ body MemWin::update {event} {
# ------------------------------------------------------------------
# METHOD: idle - memory window is idle, so enable menus
# ------------------------------------------------------------------
-body MemWin::idle {event} {
+itcl::body MemWin::idle {event} {
# Fencepost
set Running 0
@@ -399,7 +399,7 @@ body MemWin::idle {event} {
# METHOD: busy - BusyEvent handler
# Disable menus 'cause we're busy updating things.
# ------------------------------------------------------------------
-body MemWin::busy {event} {
+itcl::body MemWin::busy {event} {
# Fencepost
set Running 1
@@ -426,7 +426,7 @@ body MemWin::busy {event} {
# METHOD: newsize - calculate how many rows to display when the
# window is resized.
# ------------------------------------------------------------------
-body MemWin::newsize {height} {
+itcl::body MemWin::newsize {height} {
if {$dont_size || $Running} {
return
@@ -448,7 +448,7 @@ body MemWin::newsize {height} {
}
}
-body MemWin::_update_address {make_busy} {
+itcl::body MemWin::_update_address {make_busy} {
if {$make_busy} {
gdbtk_busy
}
@@ -461,7 +461,7 @@ body MemWin::_update_address {make_busy} {
# ------------------------------------------------------------------
# METHOD: update_address_cb - address entry widget callback
# ------------------------------------------------------------------
-body MemWin::update_address_cb {} {
+itcl::body MemWin::update_address_cb {} {
set new_entry 1
_update_address 1
}
@@ -469,7 +469,7 @@ body MemWin::update_address_cb {} {
# ------------------------------------------------------------------
# METHOD: update_address - update address and data displayed
# ------------------------------------------------------------------
-body MemWin::update_address {addr_exp} {
+itcl::body MemWin::update_address {addr_exp} {
set bad_expr 0
set saved_addr $current_addr
@@ -521,7 +521,7 @@ body MemWin::update_address {addr_exp} {
# ------------------------------------------------------------------
# METHOD: BadExpr - handle a bad expression
# ------------------------------------------------------------------
-body MemWin::BadExpr {errTxt} {
+itcl::body MemWin::BadExpr {errTxt} {
if {$new_entry} {
tk_messageBox -type ok -icon error -message $errTxt
set new_entry 0
@@ -537,7 +537,7 @@ body MemWin::BadExpr {errTxt} {
# METHOD: incr_addr - callback from control widget to increment
# the current address.
# ------------------------------------------------------------------
-body MemWin::incr_addr {num} {
+itcl::body MemWin::incr_addr {num} {
if {$current_addr == ""} {
return
}
@@ -564,7 +564,7 @@ body MemWin::incr_addr {num} {
# METHOD: update_addr - read in data starting at $current_addr
# This is just a helper function for update_address.
# ------------------------------------------------------------------
-body MemWin::update_addr {} {
+itcl::body MemWin::update_addr {} {
global _mem ${this}_memval
set row 0
@@ -602,7 +602,7 @@ body MemWin::update_addr {} {
# ------------------------------------------------------------------
# METHOD: hidemb - hide the menubar. NOT CURRENTLY USED
# ------------------------------------------------------------------
-body MemWin::hidemb {} {
+itcl::body MemWin::hidemb {} {
set mbar 0
reconfig
}
@@ -610,7 +610,7 @@ body MemWin::hidemb {} {
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body MemWin::reconfig {} {
+itcl::body MemWin::reconfig {} {
debug
set addr_exp [string trimright [string trimleft $addr_exp]]
set wh [winfo height $top]
@@ -651,7 +651,7 @@ body MemWin::reconfig {} {
# ------------------------------------------------------------------
# METHOD: do_popup - Display popup menu
# ------------------------------------------------------------------
-body MemWin::do_popup {X Y} {
+itcl::body MemWin::do_popup {X Y} {
if {$Running} { return }
$itk_component(table).menu delete 0 end
$itk_component(table).menu add check -label "Auto Update" -variable _mem($this,enabled) \
@@ -671,7 +671,7 @@ body MemWin::do_popup {X Y} {
# ------------------------------------------------------------------
# METHOD: goto - change the address of the current memory window
# ------------------------------------------------------------------
-body MemWin::goto { addr } {
+itcl::body MemWin::goto { addr } {
set current_addr $addr
$itk_interior.f.cntl delete 0 end
$itk_interior.f.cntl insert end $addr
@@ -683,7 +683,7 @@ body MemWin::goto { addr } {
# On startup, if the public variable "addr_exp" was not set,
# then set it to the start of ".data" if found, otherwise "$pc"
# ------------------------------------------------------------------
-body MemWin::init_addr_exp {} {
+itcl::body MemWin::init_addr_exp {} {
if {$addr_exp == ""} {
set err [catch {gdb_cmd "info file"} result]
if {!$err} {
@@ -705,7 +705,7 @@ body MemWin::init_addr_exp {} {
# ------------------------------------------------------------------
# METHOD: cursor - set the cursor
# ------------------------------------------------------------------
-body MemWin::cursor {glyph} {
+itcl::body MemWin::cursor {glyph} {
# Set cursor for all labels
# for {set i 0} {$i < $bytes_per_row} {incr i $size} {
# $itk_component(table).h.$i configure -cursor $glyph
@@ -726,7 +726,7 @@ body MemWin::cursor {glyph} {
# x - +1 to move down one cell, -1 to move up one cell.
# y - +1 to move right one cell, -1 to move left one cell.
-body MemWin::memMoveCell {w x y} {
+itcl::body MemWin::memMoveCell {w x y} {
if {[catch {$w index active row} r]} return
set c [$w index active col]
if {$ascii && ($c == $Numcols)} {
@@ -766,7 +766,7 @@ body MemWin::memMoveCell {w x y} {
# type - The dialog type (tk_messageBox).
# Default: ok
# ------------------------------------------------------------
-body MemWin::error_dialog {msg {modality task} {type ok}} {
+itcl::body MemWin::error_dialog {msg {modality task} {type ok}} {
set parent [winfo toplevel [namespace tail $this]]
tk_messageBox -icon error -title Error -type $type \
-message $msg -parent $parent
diff --git a/gdb/gdbtk/library/memwin.ith b/gdb/gdbtk/library/memwin.ith
index 356c84bbaaf..f71c4325153 100644
--- a/gdb/gdbtk/library/memwin.ith
+++ b/gdb/gdbtk/library/memwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class MemWin {
+itcl::class MemWin {
inherit EmbeddedWin GDBWin
private {
diff --git a/gdb/gdbtk/library/modal.tcl b/gdb/gdbtk/library/modal.tcl
index 97a65bd72d2..47768448175 100644
--- a/gdb/gdbtk/library/modal.tcl
+++ b/gdb/gdbtk/library/modal.tcl
@@ -23,7 +23,7 @@
#
# ----------------------------------------------------------------------
-class ModalDialog {
+itcl::class ModalDialog {
# This is the variable we vwait on when the dialog is posted.
# It is set to 1 in the unpost method, and to -1 in the destructor.
diff --git a/gdb/gdbtk/library/pluginwin.itcl b/gdb/gdbtk/library/pluginwin.itcl
index 07eb5990a4f..2db7bb46f94 100644
--- a/gdb/gdbtk/library/pluginwin.itcl
+++ b/gdb/gdbtk/library/pluginwin.itcl
@@ -28,7 +28,7 @@
#
# ----------------------------------------------------------------------
-class PluginWindow {
+itcl::class PluginWindow {
inherit ManagedWin GDBEventHandler
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/process.itb b/gdb/gdbtk/library/process.itb
index 5c1e84830cf..80c1bed8a00 100644
--- a/gdb/gdbtk/library/process.itb
+++ b/gdb/gdbtk/library/process.itb
@@ -18,7 +18,7 @@
#
# ----------------------------------------------------------------------
-body ProcessWin::constructor {args} {
+itcl::body ProcessWin::constructor {args} {
window_name "Processes"
gdbtk_busy
@@ -33,7 +33,7 @@ body ProcessWin::constructor {args} {
# ------------------------------------------------------------------
# METHOD: build_win - build the main process window
# ------------------------------------------------------------------
-body ProcessWin::build_win {} {
+itcl::body ProcessWin::build_win {} {
global tcl_platform
if {$tcl_platform(platform) == "windows"} {
@@ -65,7 +65,7 @@ body ProcessWin::build_win {} {
# ------------------------------------------------------------------
# METHOD: update - update widget when something changes
# ------------------------------------------------------------------
-body ProcessWin::update {event} {
+itcl::body ProcessWin::update {event} {
if {!$protect_me} {
$itk_component(slbox) delete 0 end
@@ -111,7 +111,7 @@ body ProcessWin::update {event} {
# METHOD: change_context - change the current context (active thread)
# This method is currently ONLY called from the mouse binding
# ------------------------------------------------------------------
-body ProcessWin::change_context {} {
+itcl::body ProcessWin::change_context {} {
if {!$Running && [$itk_component(slbox) size] != 0} {
gdbtk_busy
set sel [$itk_component(slbox) curselection]
@@ -129,14 +129,14 @@ body ProcessWin::change_context {} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body ProcessWin::destructor {} {
+itcl::body ProcessWin::destructor {} {
remove_hook gdb_no_inferior_hook [code $this no_inferior]
}
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body ProcessWin::reconfig {} {
+itcl::body ProcessWin::reconfig {} {
destroy $itk_interior.s
if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
if {[winfo exists $itk_interior.slbox]} { destroy $itk_interior.slbox }
@@ -150,7 +150,7 @@ body ProcessWin::reconfig {} {
# - clicks in the window
# - change mouse pointer
# ------------------------------------------------------------------
-body ProcessWin::busy {event} {
+itcl::body ProcessWin::busy {event} {
set Running 1
cursor watch
}
@@ -158,7 +158,7 @@ body ProcessWin::busy {event} {
# ------------------------------------------------------------------
# METHOD: idle - handle IdleEvent
# ------------------------------------------------------------------
-body ProcessWin::idle {event} {
+itcl::body ProcessWin::idle {event} {
set Running 0
cursor {}
}
@@ -168,6 +168,6 @@ body ProcessWin::idle {event} {
# This is a convenience method which simply sets the mouse
# pointer to the given glyph.
# ------------------------------------------------------------------
-body ProcessWin::cursor {glyph} {
+itcl::body ProcessWin::cursor {glyph} {
$_top configure -cursor $glyph
}
diff --git a/gdb/gdbtk/library/process.ith b/gdb/gdbtk/library/process.ith
index 3668b709826..e13df457eed 100644
--- a/gdb/gdbtk/library/process.ith
+++ b/gdb/gdbtk/library/process.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class ProcessWin {
+itcl::class ProcessWin {
inherit EmbeddedWin GDBWin
private {
diff --git a/gdb/gdbtk/library/regwin.itb b/gdb/gdbtk/library/regwin.itb
index 55b236f8e43..4c94112563d 100644
--- a/gdb/gdbtk/library/regwin.itb
+++ b/gdb/gdbtk/library/regwin.itb
@@ -38,7 +38,7 @@
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::constructor {args} {
+itcl::body RegWin::constructor {args} {
eval itk_initialize $args
@@ -61,7 +61,7 @@ body RegWin::constructor {args} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::destructor {} {
+itcl::body RegWin::destructor {} {
debug
}
@@ -72,7 +72,7 @@ body RegWin::destructor {} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_load_prefs {} {
+itcl::body RegWin::_load_prefs {} {
debug
# Find out largest register name length.
@@ -155,7 +155,7 @@ body RegWin::_load_prefs {} {
# each RegWin. To change the layout of the table
# in the window, use RegWin::_layout_table.
# ------------------------------------------------------------------
-body RegWin::_build_win {} {
+itcl::body RegWin::_build_win {} {
# Create scrollbars and table
itk_component add vscroll {
@@ -312,7 +312,7 @@ body RegWin::_build_win {} {
# NOTES: Uses preferences to determine if/how a register
# is displayed
# ------------------------------------------------------------------
-body RegWin::_layout_table {} {
+itcl::body RegWin::_layout_table {} {
debug
if {[info exists _cell]} {
@@ -425,7 +425,7 @@ body RegWin::_layout_table {} {
# NOTES: See _size_column for the reasoning for the "down"
# option.
# ------------------------------------------------------------------
-body RegWin::_size_cell_column {cell down} {
+itcl::body RegWin::_size_cell_column {cell down} {
set col [string trim [lindex [split $cell ,] 1] ()]
_size_column $col $down
@@ -450,7 +450,7 @@ body RegWin::_size_cell_column {cell down} {
# should not downsize. This helps mitigate the
# annoyance.
# ------------------------------------------------------------------
-body RegWin::_size_column {col down} {
+itcl::body RegWin::_size_column {col down} {
set max 0
foreach cell [array names _data *,$col] {
@@ -481,7 +481,7 @@ body RegWin::_size_column {col down} {
#
# NOTES: Callback from pref system
# ------------------------------------------------------------------
-body RegWin::_prefs_changed {pref value} {
+itcl::body RegWin::_prefs_changed {pref value} {
debug "$pref $value"
# do nothing for now. With proper iwidgets this would not
# be required anyway.
@@ -502,7 +502,7 @@ body RegWin::_prefs_changed {pref value} {
# NOTES: Event handler for <Enter> and <KP_Enter>
# in table
# ------------------------------------------------------------------
-body RegWin::_accept_edit {} {
+itcl::body RegWin::_accept_edit {} {
debug
set cell [$itk_component(table) tag cell edit]
if {[llength $cell] == 1 && [info exists _register($cell)]} {
@@ -541,7 +541,7 @@ body RegWin::_accept_edit {} {
#
# NOTES: Only works with one WatchWin...
# ------------------------------------------------------------------
-body RegWin::_add_to_watch {rn} {
+itcl::body RegWin::_add_to_watch {rn} {
[ManagedWin::open WatchWin] add "\$[gdb_reginfo name $rn]"
}
@@ -554,7 +554,7 @@ body RegWin::_add_to_watch {rn} {
#
# NOTES: Only works with one WatchWin...
# ------------------------------------------------------------------
-body RegWin::_open_memory {rn} {
+itcl::body RegWin::_open_memory {rn} {
ManagedWin::open MemWin -force -addr_exp $_data($_cell($rn))
}
@@ -568,7 +568,7 @@ body RegWin::_open_memory {rn} {
# Y - y-root coordinate
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_but3 {x y X Y} {
+itcl::body RegWin::_but3 {x y X Y} {
# Only post the menu when we're not executing the inferior,
# the inferior is in a runnable state, and we're not in a disabled
@@ -650,7 +650,7 @@ body RegWin::_but3 {x y X Y} {
# ARGUMENTS: rn - the register number to remove
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_delete_from_display {rn} {
+itcl::body RegWin::_delete_from_display {rn} {
# Mark the cell as hidden
set index [lsearch $_reg_display_list $rn]
@@ -673,7 +673,7 @@ body RegWin::_delete_from_display {rn} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_display_all {} {
+itcl::body RegWin::_display_all {} {
$itk_component(reg_menu) entryconfigure $_menuitems(display_all_registers) \
-state disabled
@@ -709,7 +709,7 @@ body RegWin::_display_all {} {
# NOTES: Event handler for <1> in table.
#
# ------------------------------------------------------------------
-body RegWin::_edit {x y} {
+itcl::body RegWin::_edit {x y} {
_select_cell [$itk_component(table) index @$x,$y]
}
@@ -729,7 +729,7 @@ body RegWin::_edit {x y} {
# we're not editing, or it will move the icursor
# if we are editing.
# ------------------------------------------------------------------
-body RegWin::_move {direction} {
+itcl::body RegWin::_move {direction} {
debug $direction
@@ -823,7 +823,7 @@ body RegWin::_move {direction} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_post_menu {} {
+itcl::body RegWin::_post_menu {} {
global gdb_running
# Configure the menu for the active cell
@@ -901,7 +901,7 @@ body RegWin::_post_menu {} {
# NOTES: Adjusts the cell index so that it always
# selects the value cell for a register
# ------------------------------------------------------------------
-body RegWin::_select_cell {cell} {
+itcl::body RegWin::_select_cell {cell} {
# Abort an edit
_unedit
@@ -941,7 +941,7 @@ body RegWin::_select_cell {cell} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_unedit {} {
+itcl::body RegWin::_unedit {} {
# clear the tag
set cell [$itk_component(table) tag cell edit]
@@ -967,7 +967,7 @@ body RegWin::_unedit {} {
#
# NOTES:
# ------------------------------------------------------------------
-body RegWin::_get_value {rn} {
+itcl::body RegWin::_get_value {rn} {
if {[catch {gdb_reginfo value $rn} value]} {
dbug W "\"gdb_reginfo value $rn\" returned $value"
set value ""
@@ -988,7 +988,7 @@ body RegWin::_get_value {rn} {
#
# NOTES:
# ------------------------------------------------------------------
-body RegWin::_change_format {rn {newtype {}}} {
+itcl::body RegWin::_change_format {rn {newtype {}}} {
set name [gdb_reginfo name $rn]
@@ -1019,7 +1019,7 @@ body RegWin::_change_format {rn {newtype {}}} {
# rn - the register number to update
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::_update_register {rn} {
+itcl::body RegWin::_update_register {rn} {
set _data($_cell($rn)) [_get_value $rn]
}
@@ -1035,7 +1035,7 @@ body RegWin::_update_register {rn} {
# ARGUMENTS: event - the ArchChangedEvent (not used)
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::arch_changed {event} {
+itcl::body RegWin::arch_changed {event} {
# When the arch changes, gdb will callback into gdbtk-register.c
# to swap out the old register set, so we need only redraw the
@@ -1053,7 +1053,7 @@ body RegWin::arch_changed {event} {
# ARGUMENTS: event - the BusyEvent (not used)
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::busy {event} {
+itcl::body RegWin::busy {event} {
# Abort any edit. Need to check if the table is constructed,
# since we call gdbtk_busy when we're created...
@@ -1075,7 +1075,7 @@ body RegWin::busy {event} {
# ARGUMENTS: event - the IdleEvent (not used)
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::idle {event} {
+itcl::body RegWin::idle {event} {
# Clear fencepost
set _running 0
@@ -1091,7 +1091,7 @@ body RegWin::idle {event} {
# ARGUMENTS: None
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::set_variable {event} {
+itcl::body RegWin::set_variable {event} {
switch [$event get variable] {
disassembly-flavor {
_layout_table
@@ -1106,7 +1106,7 @@ body RegWin::set_variable {event} {
# ARGUMENTS: event - the UpdateEvent (not used)
# RETURNS: Nothing
# ------------------------------------------------------------------
-body RegWin::update {event} {
+itcl::body RegWin::update {event} {
dbug I "START REGISTER UPDATE CALLBACK"
diff --git a/gdb/gdbtk/library/regwin.ith b/gdb/gdbtk/library/regwin.ith
index 5e106a1fb3a..f44ca9e1f23 100644
--- a/gdb/gdbtk/library/regwin.ith
+++ b/gdb/gdbtk/library/regwin.ith
@@ -15,7 +15,7 @@
# GNU General Public License for more details.
-class RegWin {
+itcl::class RegWin {
inherit EmbeddedWin GDBWin
private {
diff --git a/gdb/gdbtk/library/srcbar.itcl b/gdb/gdbtk/library/srcbar.itcl
index 8bb0e0a6d6f..9e2d4ad1e06 100644
--- a/gdb/gdbtk/library/srcbar.itcl
+++ b/gdb/gdbtk/library/srcbar.itcl
@@ -28,7 +28,7 @@
#
# ----------------------------------------------------------------------
-class SrcBar {
+itcl::class SrcBar {
inherit itk::Widget GDBEventHandler
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/srcpref.itb b/gdb/gdbtk/library/srcpref.itb
index 5568c996fbb..ceb8f63feb2 100644
--- a/gdb/gdbtk/library/srcpref.itb
+++ b/gdb/gdbtk/library/srcpref.itb
@@ -15,7 +15,7 @@
# ------------------------------------------------------------------
# CONSTRUCTOR - create new source preferences window
# ------------------------------------------------------------------
-body SrcPref::constructor {args} {
+itcl::body SrcPref::constructor {args} {
window_name "Source Preferences"
_init_var
_build_win
@@ -24,7 +24,7 @@ body SrcPref::constructor {args} {
# ------------------------------------------------------------------
# METHOD: init_var - initialize preference variables
# ------------------------------------------------------------------
-body SrcPref::_init_var {} {
+itcl::body SrcPref::_init_var {} {
set vlist {gdb/src/PC_TAG gdb/src/STACK_TAG gdb/src/BROWSE_TAG
gdb/src/run_attach gdb/src/run_load gdb/src/run_run
gdb/src/run_cont gdb/src/bp_fg gdb/src/temp_bp_fg
@@ -42,7 +42,7 @@ body SrcPref::_init_var {} {
# ------------------------------------------------------------------
# METHOD: build_win - build the dialog
# ------------------------------------------------------------------
-body SrcPref::_build_win {} {
+itcl::body SrcPref::_build_win {} {
frame $itk_interior.f
frame $itk_interior.f.a
frame $itk_interior.f.b
@@ -202,7 +202,7 @@ body SrcPref::_build_win {} {
# ------------------------------------------------------------------
# METHOD: apply - apply changes
# ------------------------------------------------------------------
-body SrcPref::_apply {} {
+itcl::body SrcPref::_apply {} {
foreach var [array names _new] {
if {$_new($var) != [pref get $var]} {
#debug "$var = $_new($var)"
@@ -216,14 +216,14 @@ body SrcPref::_apply {} {
ManagedWin::restart
}
-body SrcPref::cancel {} {
+itcl::body SrcPref::cancel {} {
_save
}
# ------------------------------------------------------------------
# METHOD: _cancel
# ------------------------------------------------------------------
-body SrcPref::_cancel {} {
+itcl::body SrcPref::_cancel {} {
set any_changed 0
foreach elem [array names _saved] {
@@ -249,7 +249,7 @@ body SrcPref::_cancel {} {
# ------------------------------------------------------------------
# METHOD: save - apply changes and quit
# ------------------------------------------------------------------
-body SrcPref::_save {} {
+itcl::body SrcPref::_save {} {
_apply
unpost
}
@@ -258,7 +258,7 @@ body SrcPref::_save {} {
# METHOD: _set_flavor - sets the disassembly flavor. The set disassembly-flavor
# gdb command is already known to exist, so I don't have to check...
# ------------------------------------------------------------------
-body SrcPref::_set_flavor {w new_mode} {
+itcl::body SrcPref::_set_flavor {w new_mode} {
$w entryset $new_mode
set _new_disassembly_flavor $new_mode
}
@@ -267,7 +267,7 @@ body SrcPref::_set_flavor {w new_mode} {
# ------------------------------------------------------------------
# METHOD: pick - pick colors
# ------------------------------------------------------------------
-body SrcPref::_pick {color win tag} {
+itcl::body SrcPref::_pick {color win tag} {
set new_color [tk_chooseColor -initialcolor $color -title "Choose color"]
if {$new_color != $color && $new_color != {}} {
set _new(gdb/src/$tag) $new_color
diff --git a/gdb/gdbtk/library/srcpref.ith b/gdb/gdbtk/library/srcpref.ith
index 5490f8b1408..60a9ede2888 100644
--- a/gdb/gdbtk/library/srcpref.ith
+++ b/gdb/gdbtk/library/srcpref.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class SrcPref {
+itcl::class SrcPref {
inherit ManagedWin ModalDialog
private {
diff --git a/gdb/gdbtk/library/srctextwin.itb b/gdb/gdbtk/library/srctextwin.itb
index 8ccf151085a..d92c0f67f07 100644
--- a/gdb/gdbtk/library/srctextwin.itb
+++ b/gdb/gdbtk/library/srctextwin.itb
@@ -21,7 +21,7 @@
# ------------------------------------------------------------------
# CONSTRUCTOR - create new source text window
# ------------------------------------------------------------------
-body SrcTextWin::constructor {args} {
+itcl::body SrcTextWin::constructor {args} {
eval itk_initialize $args
set top [winfo toplevel $itk_interior]
if {$parent == {}} {
@@ -76,7 +76,7 @@ body SrcTextWin::constructor {args} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body SrcTextWin::destructor {} {
+itcl::body SrcTextWin::destructor {} {
if {$Tracing} {
remove_hook control_mode_hook "$this set_control_mode"
}
@@ -90,7 +90,7 @@ body SrcTextWin::destructor {} {
# need to do here is to remove the trace tags, if we are exiting
# trace mode
# ------------------------------------------------------------------
-body SrcTextWin::trace_find_hook {mode from_tty} {
+itcl::body SrcTextWin::trace_find_hook {mode from_tty} {
if {[string compare $mode -1] == 0} {
if {$Browsing} {
$twin tag remove STACK_TAG 1.0 end
@@ -103,7 +103,7 @@ body SrcTextWin::trace_find_hook {mode from_tty} {
# browsing -> mode = 1
# controlling -> mode = 0
# ------------------------------------------------------------------
-body SrcTextWin::set_control_mode {mode} {
+itcl::body SrcTextWin::set_control_mode {mode} {
# debug "Setting control mode of $twin to $mode"
if {$mode} {
set Browsing 1
@@ -153,7 +153,7 @@ body SrcTextWin::set_control_mode {mode} {
# browse_disabled - a similar list for menus that should be disabled
# when you are browsing a trace expt.
#
-body SrcTextWin::build_popups {} {
+itcl::body SrcTextWin::build_popups {} {
set popups(bp) $itk_interior.bp_menu
set popups(tp) $itk_interior.tp_menu
@@ -303,7 +303,7 @@ body SrcTextWin::build_popups {} {
# ------------------------------------------------------------------
# METHOD: build_win - build the main source paned window
# ------------------------------------------------------------------
-body SrcTextWin::build_win {} {
+itcl::body SrcTextWin::build_win {} {
cyg::panedwindow $itk_interior.p
set _tpane pane$filenum
@@ -326,7 +326,7 @@ body SrcTextWin::build_win {} {
# METHOD: SetRunningState - set state based on if GDB is running or not.
# This disables the popup menus when GDB is not running yet.
# ------------------------------------------------------------------
-body SrcTextWin::SetRunningState {state} {
+itcl::body SrcTextWin::SetRunningState {state} {
# debug "$state"
foreach elem $popups(run_disabled) {
$popups([lindex $elem 0]) entryconfigure [lindex $elem 1] -state $state
@@ -336,7 +336,7 @@ body SrcTextWin::SetRunningState {state} {
# ------------------------------------------------------------------
# METHOD: enable - enable or disable bindings and change cursor
# ------------------------------------------------------------------
-body SrcTextWin::enable {on} {
+itcl::body SrcTextWin::enable {on} {
if {$on} {
set Running 0
set glyph ""
@@ -369,7 +369,7 @@ body SrcTextWin::enable {on} {
# ------------------------------------------------------------------
# PROC: makeBreakDot - make the break dot for the screen
# ------------------------------------------------------------------
-body SrcTextWin::makeBreakDot {size colorList {image {}}} {
+itcl::body SrcTextWin::makeBreakDot {size colorList {image {}}} {
if {$size > 32} {
set size 32
} elseif {$size < 1} {
@@ -405,7 +405,7 @@ body SrcTextWin::makeBreakDot {size colorList {image {}}} {
# ------------------------------------------------------------------
# METHOD: setTabs - set the tabs for the assembly/src windows
# ------------------------------------------------------------------
-body SrcTextWin::setTabs {win {asm S}} {
+itcl::body SrcTextWin::setTabs {win {asm S}} {
set fsize [font measure [pref get gdb/src/font] "W"]
set tsize [pref get gdb/src/tab_size]
set rest ""
@@ -441,7 +441,7 @@ body SrcTextWin::setTabs {win {asm S}} {
$win configure -tabs $tablist
}
-body SrcTextWin::enable_disable_src_tags {win how} {
+itcl::body SrcTextWin::enable_disable_src_tags {win how} {
switch $how {
normal {
@@ -490,7 +490,7 @@ body SrcTextWin::enable_disable_src_tags {win how} {
# ------------------------------------------------------------------
# METHOD: config_win - configure the source or assembly text window
# ------------------------------------------------------------------
-body SrcTextWin::config_win {win {asm S}} {
+itcl::body SrcTextWin::config_win {win {asm S}} {
# debug "$win $asm Tracing=$Tracing Browsing=$Browsing"
$win config -borderwidth 2 -insertwidth 0 -wrap none
@@ -690,7 +690,7 @@ body SrcTextWin::config_win {win {asm S}} {
# ------------------------------------------------------------------
# METHOD: addPopup - adds a popup to one of the source popup menus
# ------------------------------------------------------------------
-body SrcTextWin::addPopup {menu label command {abg {}} {browse 1} {run 1}} {
+itcl::body SrcTextWin::addPopup {menu label command {abg {}} {browse 1} {run 1}} {
if {$abg == ""} {
$popups($menu) add command -label $label -command $command
@@ -713,7 +713,7 @@ body SrcTextWin::addPopup {menu label command {abg {}} {browse 1} {run 1}} {
# PUBLIC METHOD: set_variable - Handle changes in the gdb variables
# changed through the "set" gdb command.
# ------------------------------------------------------------------
-body SrcTextWin::set_variable {event} {
+itcl::body SrcTextWin::set_variable {event} {
set var [$event get variable]
set val [$event get value]
debug "Set hook got called with $var $val"
@@ -729,7 +729,7 @@ body SrcTextWin::set_variable {event} {
# mark all the cached assembly windows dirty, and force the
# visible window to be redisplayed.
# ------------------------------------------------------------------
-body SrcTextWin::disassembly_changed {} {
+itcl::body SrcTextWin::disassembly_changed {} {
foreach name [array names Stwc *:pane] {
debug "Looking at $name"
set vals [split $name ,]
@@ -749,7 +749,7 @@ body SrcTextWin::disassembly_changed {} {
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body SrcTextWin::reconfig {} {
+itcl::body SrcTextWin::reconfig {} {
# debug
# Make sure we redo the break images when we reconfigure
@@ -827,7 +827,7 @@ body SrcTextWin::reconfig {} {
# ------------------------------------------------------------------
# METHOD: updateBalloon - we have gone idle, update the balloon
# ------------------------------------------------------------------
-body SrcTextWin::updateBalloon {} {
+itcl::body SrcTextWin::updateBalloon {} {
set err [catch {$_balloon_var update} changed]
catch {$_balloon_var name} var
@@ -841,7 +841,7 @@ body SrcTextWin::updateBalloon {} {
}
}
-body SrcTextWin::balloon_value {variable} {
+itcl::body SrcTextWin::balloon_value {variable} {
catch {$variable value} value
set value [string trim $value \ \r\t\n]
@@ -866,7 +866,7 @@ body SrcTextWin::balloon_value {variable} {
# ------------------------------------------------------------------
# METHOD: ClearTags - clear all tags
# ------------------------------------------------------------------
-body SrcTextWin::ClearTags {} {
+itcl::body SrcTextWin::ClearTags {} {
foreach tag {PC_TAG BROWSE_TAG STACK_TAG} {
catch {
$twin tag remove $tag $current(line).2 $current(line).end
@@ -883,7 +883,7 @@ body SrcTextWin::ClearTags {} {
# METHOD: _mtime_changed - check if the modtime for a file
# has changed.
# ------------------------------------------------------------------
-body SrcTextWin::_mtime_changed {filename} {
+itcl::body SrcTextWin::_mtime_changed {filename} {
global tcl_platform
if [catch {gdb_find_file $filename} f] {
@@ -920,7 +920,7 @@ body SrcTextWin::_mtime_changed {filename} {
# ------------------------------------------------------------------
# METHOD: FillSource - fill a window with source
# ------------------------------------------------------------------
-body SrcTextWin::FillSource {w tagname filename funcname line addr pc_addr lib} {
+itcl::body SrcTextWin::FillSource {w tagname filename funcname line addr pc_addr lib} {
global gdb_running
upvar ${w}win win
@@ -1000,7 +1000,7 @@ body SrcTextWin::FillSource {w tagname filename funcname line addr pc_addr lib}
# ------------------------------------------------------------------
# METHOD: FillAssembly - fill a window with disassembled code
# ------------------------------------------------------------------
-body SrcTextWin::FillAssembly {w tagname filename funcname line addr pc_addr lib} {
+itcl::body SrcTextWin::FillAssembly {w tagname filename funcname line addr pc_addr lib} {
global gdb_running
upvar ${w}win win
upvar _${w}pane pane
@@ -1067,7 +1067,7 @@ body SrcTextWin::FillAssembly {w tagname filename funcname line addr pc_addr lib
# ------------------------------------------------------------------
# METHOD: FillMixed - fill a window with mixed source and assembly
# ------------------------------------------------------------------
-body SrcTextWin::FillMixed {w tagname filename funcname line addr pc_addr lib} {
+itcl::body SrcTextWin::FillMixed {w tagname filename funcname line addr pc_addr lib} {
global gdb_running
upvar ${w}win win
upvar _${w}pane pane
@@ -1125,7 +1125,7 @@ body SrcTextWin::FillMixed {w tagname filename funcname line addr pc_addr lib} {
# METHOD: _highlightAsmLine - highlight the current execution line
# in one of the assembly modes
# ------------------------------------------------------------------
-body SrcTextWin::_highlightAsmLine {win addr pc_addr \
+itcl::body SrcTextWin::_highlightAsmLine {win addr pc_addr \
tagname filename funcname} {
global gdb_running
@@ -1161,7 +1161,7 @@ body SrcTextWin::_highlightAsmLine {win addr pc_addr \
# ------------------------------------------------------------------
# METHOD: set_tag - update tag to STACK without making other changes
# ------------------------------------------------------------------
-body SrcTextWin::set_tag_to_stack {} {
+itcl::body SrcTextWin::set_tag_to_stack {} {
foreach window [list $twin $bwin] {
if {$window == ""} then {
continue
@@ -1177,7 +1177,7 @@ body SrcTextWin::set_tag_to_stack {} {
# ------------------------------------------------------------------
# METHOD: location - display a location in a file
# ------------------------------------------------------------------
-body SrcTextWin::location {tagname filename funcname line addr pc_addr lib} {
+itcl::body SrcTextWin::location {tagname filename funcname line addr pc_addr lib} {
# debug "$tagname $filename $line $addr $pc_addr, mode=$current(mode) oldmode=$oldmode cf=$current(filename) lib=$lib"
ClearTags
@@ -1254,7 +1254,7 @@ body SrcTextWin::location {tagname filename funcname line addr pc_addr lib} {
# ------------------------------------------------------------------
# METHOD: LoadFile - loads in a new source file
# ------------------------------------------------------------------
-body SrcTextWin::LoadFile {w name lib mtime_changed} {
+itcl::body SrcTextWin::LoadFile {w name lib mtime_changed} {
debug "$name $current(filename) $current(mode)"
upvar ${w}win win
upvar _${w}pane pane
@@ -1287,7 +1287,7 @@ body SrcTextWin::LoadFile {w name lib mtime_changed} {
# METHOD: display_line - make sure a line is displayed and near the center
# ------------------------------------------------------------------
-body SrcTextWin::display_line { win line } {
+itcl::body SrcTextWin::display_line { win line } {
::update idletasks
# keep line near center of display
set pixHeight [winfo height $win]
@@ -1310,7 +1310,7 @@ body SrcTextWin::display_line { win line } {
# uses current(filename) in SOURCE mode
# ------------------------------------------------------------------
-body SrcTextWin::display_breaks {} {
+itcl::body SrcTextWin::display_breaks {} {
# debug
# clear any previous breakpoints
@@ -1355,7 +1355,7 @@ body SrcTextWin::display_breaks {} {
# METHOD: insertBreakTag - insert the right amount of tag chars
# into the text window WIN, at line linenum.
# ------------------------------------------------------------------
-body SrcTextWin::insertBreakTag {win linenum tag} {
+itcl::body SrcTextWin::insertBreakTag {win linenum tag} {
# debug "$win $linenum $tag"
# Get the tags at the current line.
@@ -1399,7 +1399,7 @@ body SrcTextWin::insertBreakTag {win linenum tag} {
# from the given line. If this is the last break tag on the
# line reinstall the break_rgn_tag
# ------------------------------------------------------------------
-body SrcTextWin::removeBreakTag {win linenum tag } {
+itcl::body SrcTextWin::removeBreakTag {win linenum tag } {
# debug "$win $linenum $tag"
set tag_list [$win tag names $linenum.0]
@@ -1452,7 +1452,7 @@ body SrcTextWin::removeBreakTag {win linenum tag } {
# PUBLIC METHOD: breakpoint - Handle a breakpoint create, delete,
# or modify event from the backend.
# ------------------------------------------------------------------
-body SrcTextWin::breakpoint {bp_event} {
+itcl::body SrcTextWin::breakpoint {bp_event} {
bp [$bp_event get action] [$bp_event get number] [$bp_event get address] \
[$bp_event get line] [$bp_event get file] [$bp_event get disposition] \
@@ -1463,7 +1463,7 @@ body SrcTextWin::breakpoint {bp_event} {
# PUBLIC METHOD: tracepoint - Handle a tracepoint create, delete,
# modify event from the backend.
# ------------------------------------------------------------------
-body SrcTextWin::tracepoint {tp_event} {
+itcl::body SrcTextWin::tracepoint {tp_event} {
bp [$tp_event get action] [$tp_event get number] [$tp_event get address] \
[$tp_event get line] [$tp_event get file] tracepoint \
@@ -1477,7 +1477,7 @@ body SrcTextWin::tracepoint {tp_event} {
# mixed window at that address. If $line and $file are valid,
# a breakpoint will be set in the source window if appropriate.
# ------------------------------------------------------------------
-body SrcTextWin::bp {action bpnum addr {linenum {}} {file {}} {type 0} {enabled 0} {thread -1}} {
+itcl::body SrcTextWin::bp {action bpnum addr {linenum {}} {file {}} {type 0} {enabled 0} {thread -1}} {
# debug "$action addr=$addr line=$linenum file=$file type=$type current(filename)=$current(filename)"
switch $current(mode) {
@@ -1516,7 +1516,7 @@ body SrcTextWin::bp {action bpnum addr {linenum {}} {file {}} {type 0} {enabled
# ------------------------------------------------------------------
# METHOD: do_bp - bp helper function
# ------------------------------------------------------------------
-body SrcTextWin::do_bp { win action linenum type bpnum enabled thread asm} {
+itcl::body SrcTextWin::do_bp { win action linenum type bpnum enabled thread asm} {
# debug "$action line=$linenum type=$type bpnum=$bpnum enabled=$enabled thread=$thread"
if {$dont_change_appearance} {
@@ -1613,7 +1613,7 @@ body SrcTextWin::do_bp { win action linenum type bpnum enabled thread asm} {
# ------------------------------------------------------------------
# METHOD: hasBP - see if a line number has a breakpoint set
# ------------------------------------------------------------------
-body SrcTextWin::hasBP {win line} {
+itcl::body SrcTextWin::hasBP {win line} {
if {$win == ""} {
set win $popups(saved_win)
}
@@ -1627,7 +1627,7 @@ body SrcTextWin::hasBP {win line} {
# ------------------------------------------------------------------
# METHOD: hasTP - see if a line number has a tracepoint set
# ------------------------------------------------------------------
-body SrcTextWin::hasTP {win line} {
+itcl::body SrcTextWin::hasTP {win line} {
if {$win == ""} {
set win $popups(saved_win)
}
@@ -1649,7 +1649,7 @@ body SrcTextWin::hasTP {win line} {
# Return:
# The gdb_loc result for the location found
# ------------------------------------------------------------------
-body SrcTextWin::report_source_location {} {
+itcl::body SrcTextWin::report_source_location {} {
if {$current(filename) == ""} {
error "No source file in window"
@@ -1716,7 +1716,7 @@ body SrcTextWin::report_source_location {} {
# set_cmd - for convenience, this is the command needed to set a
# breakpoint at this address.
# ------------------------------------------------------------------
-body SrcTextWin::lookup_line {win y} {
+itcl::body SrcTextWin::lookup_line {win y} {
#debug "$win $y"
if {$y == -1} {
set y $popups(saved_y)
@@ -1770,7 +1770,7 @@ body SrcTextWin::lookup_line {win y} {
#
# The threads parameter is not currently used.
# ------------------------------------------------------------------
-body SrcTextWin::continue_to_here {{win {}} {y -1} {threads -1}} {
+itcl::body SrcTextWin::continue_to_here {{win {}} {y -1} {threads -1}} {
# Look up the line... This foreach is an lassign...
foreach {name line addr type set_cmd} [lookup_line $win $y] {
@@ -1802,7 +1802,7 @@ body SrcTextWin::continue_to_here {{win {}} {y -1} {threads -1}} {
#
# The threads parameter is not currently used.
# ------------------------------------------------------------------
-body SrcTextWin::jump_to_here {{win {}} {y -1} {threads -1}} {
+itcl::body SrcTextWin::jump_to_here {{win {}} {y -1} {threads -1}} {
# Look up the line... This foreach is an lassign...
foreach {name line addr type set_cmd} [lookup_line $win $y] {
@@ -1846,7 +1846,7 @@ body SrcTextWin::jump_to_here {{win {}} {y -1} {threads -1}} {
#
# When "threads" is set it means to set a bp on each thread in the list.
# ------------------------------------------------------------------
-body SrcTextWin::set_bp_at_line {{type N} {win {}} {y -1} {threads "-1"}} {
+itcl::body SrcTextWin::set_bp_at_line {{type N} {win {}} {y -1} {threads "-1"}} {
# debug "$win $y $type $current(filename) Tracing=$Tracing"
if {$Running} {return}
@@ -1875,7 +1875,7 @@ body SrcTextWin::set_bp_at_line {{type N} {win {}} {y -1} {threads "-1"}} {
# ------------------------------------------------------------------
# METHOD: enable_disable_at_line - Enable or disable breakpoint
# ------------------------------------------------------------------
-body SrcTextWin::enable_disable_at_line {action} {
+itcl::body SrcTextWin::enable_disable_at_line {action} {
if {$Running} {
return
}
@@ -1923,7 +1923,7 @@ body SrcTextWin::enable_disable_at_line {action} {
#
# when "threads" is set it means to set a bp on each thread in the list.
# ------------------------------------------------------------------
-body SrcTextWin::remove_bp_at_line {{win {}} {y -1}} {
+itcl::body SrcTextWin::remove_bp_at_line {{win {}} {y -1}} {
if {$Running} {return}
@@ -1950,7 +1950,7 @@ body SrcTextWin::remove_bp_at_line {{win {}} {y -1}} {
#
# when "threads" is set it means to set a bp on each thread in the list.
# ------------------------------------------------------------------
-body SrcTextWin::set_tp_at_line {{win {}} {y -1}} {
+itcl::body SrcTextWin::set_tp_at_line {{win {}} {y -1}} {
# debug "$win $y $current(filename) Tracing=$Tracing"
if {$Running} {return}
@@ -1976,7 +1976,7 @@ body SrcTextWin::set_tp_at_line {{win {}} {y -1}} {
# given by win & y...
#
# ------------------------------------------------------------------
-body SrcTextWin::next_hit_at_line {{win {}} {y -1}} {
+itcl::body SrcTextWin::next_hit_at_line {{win {}} {y -1}} {
# debug "$win $y $current(filename) Tracing=$Tracing"
if {!$Browsing} {return}
@@ -2006,7 +2006,7 @@ body SrcTextWin::next_hit_at_line {{win {}} {y -1}} {
#
# when "threads" is set it means to set a bp on each thread in the list.
# ------------------------------------------------------------------
-body SrcTextWin::remove_tp_at_line {{win {}} {y -1}} {
+itcl::body SrcTextWin::remove_tp_at_line {{win {}} {y -1}} {
if {$Running} {return}
@@ -2037,7 +2037,7 @@ Error was: $errTxt"
# METHOD: do_tag_popup - The tag bind function for breakpoint popups
# ------------------------------------------------------------------
-body SrcTextWin::do_tag_popup {name X Y y} {
+itcl::body SrcTextWin::do_tag_popup {name X Y y} {
# debug "$name $X $Y $y"
@@ -2060,7 +2060,7 @@ body SrcTextWin::do_tag_popup {name X Y y} {
# METHOD: do_source_popup - tag bind function for source popups
# ------------------------------------------------------------------
-body SrcTextWin::do_source_popup { X Y x y } {
+itcl::body SrcTextWin::do_source_popup { X Y x y } {
if {$Running || [winfo ismapped $popups(source)]} {
return
}
@@ -2149,14 +2149,14 @@ body SrcTextWin::do_source_popup { X Y x y } {
# ------------------------------------------------------------------
# METHOD: addToWatch - add a variable to the watch window
# ------------------------------------------------------------------
-body SrcTextWin::addToWatch {var} {
+itcl::body SrcTextWin::addToWatch {var} {
[ManagedWin::open WatchWin] add $var
}
# ------------------------------------------------------------------
# METHOD: do_key -- wrapper for all key bindings
# ------------------------------------------------------------------
-body SrcTextWin::do_key {key} {
+itcl::body SrcTextWin::do_key {key} {
if {!$Running} {
switch $key {
print { print }
@@ -2204,14 +2204,14 @@ body SrcTextWin::do_key {key} {
# ------------------------------------------------------------------
# METHOD: mode_get - get the source mode
# ------------------------------------------------------------------
-body SrcTextWin::mode_get {} {
+itcl::body SrcTextWin::mode_get {} {
return $current(mode)
}
# ------------------------------------------------------------------
# METHOD: mode_set - change the source mode
# ------------------------------------------------------------------
-body SrcTextWin::mode_set {new_mode {go 1}} {
+itcl::body SrcTextWin::mode_set {new_mode {go 1}} {
debug "$new_mode"
if {$new_mode != $current(mode)} {
@@ -2236,7 +2236,7 @@ body SrcTextWin::mode_set {new_mode {go 1}} {
# METHOD: cancelMotion - cancel any pending motion callbacks for
# the source window's variable balloons
# ------------------------------------------------------------------
-body SrcTextWin::cancelMotion {} {
+itcl::body SrcTextWin::cancelMotion {} {
catch {after cancel $timeoutID}
}
@@ -2244,7 +2244,7 @@ body SrcTextWin::cancelMotion {} {
# METHOD: motion - callback for mouse motion within the source
# window's text widget
# ------------------------------------------------------------------
-body SrcTextWin::motion {type win x y} {
+itcl::body SrcTextWin::motion {type win x y} {
global gdb_running
cancelMotion
@@ -2270,7 +2270,7 @@ body SrcTextWin::motion {type win x y} {
# ------------------------------------------------------------------
# METHOD: showBPBalloon - show BP information in a balloon
# ------------------------------------------------------------------
-body SrcTextWin::showBPBalloon {win x y} {
+itcl::body SrcTextWin::showBPBalloon {win x y} {
if {$Running} { return }
$win tag remove _show_variable 1.0 end
set line [lindex [split [$win index @0,$y] .] 0]
@@ -2367,7 +2367,7 @@ body SrcTextWin::showBPBalloon {win x y} {
# METHOD: showBalloon - (possibly) show a variable's value in
# a balloon-help widget
# ------------------------------------------------------------------
-body SrcTextWin::showBalloon {win x y} {
+itcl::body SrcTextWin::showBalloon {win x y} {
if {$Running} { return }
$twin tag remove _show_variable 1.0 end
@@ -2434,7 +2434,7 @@ body SrcTextWin::showBalloon {win x y} {
# METHOD: getVariable - get the name of the 'variable' under the
# mouse pointer in the text widget
# ------------------------------------------------------------------
-body SrcTextWin::getVariable {x y {line {}}} {
+itcl::body SrcTextWin::getVariable {x y {line {}}} {
#debug "$x $y $line"
set hit_point [$twin index @$x,$y]
@@ -2512,7 +2512,7 @@ body SrcTextWin::getVariable {x y {line {}}} {
# ------------------------------------------------------------------
# METHOD: trace_help - update statusbar with ballon help message
# ------------------------------------------------------------------
-body SrcTextWin::trace_help {args} {
+itcl::body SrcTextWin::trace_help {args} {
upvar #0 ${this}_balloon a
if {$a == ""} {
$parent set_status
@@ -2521,7 +2521,7 @@ body SrcTextWin::trace_help {args} {
}
}
-body SrcTextWin::line_is_executable {win line} {
+itcl::body SrcTextWin::line_is_executable {win line} {
# there should be an image or a "-" on the line
set res [catch {$win image cget $line.0 -image}]
if {!$res || [$win get $line.0] == "-"} {
@@ -2534,7 +2534,7 @@ body SrcTextWin::line_is_executable {win line} {
# METHOD: tracepoint_range - create tracepoints at every line in
# a range of lines on the screen
# ------------------------------------------------------------------
-body SrcTextWin::tracepoint_range {win low high} {
+itcl::body SrcTextWin::tracepoint_range {win low high} {
# debug "$win $low $high"
switch $current(mode) {
@@ -2607,7 +2607,7 @@ body SrcTextWin::tracepoint_range {win low high} {
# METHOD: search - search for text or jump to a specific line
# in source window, going in the specified DIRECTION.
# ------------------------------------------------------------------
-body SrcTextWin::search {exp direction} {
+itcl::body SrcTextWin::search {exp direction} {
if {$exp != ""} {
set result {}
if {[regexp {^@([0-9]+)} $exp dummy index]} {
@@ -2671,7 +2671,7 @@ body SrcTextWin::search {exp direction} {
# filled in later due to errors, call UnLoadFromCache.
# -----------------------------------------------------------------------------
-body SrcTextWin::LoadFromCache {w name asm lib} {
+itcl::body SrcTextWin::LoadFromCache {w name asm lib} {
debug "LoadFromCache $w $name $asm"
global tcl_platform
upvar ${w}win win
@@ -2773,7 +2773,7 @@ body SrcTextWin::LoadFromCache {w name asm lib} {
# there is a problem with filling the widget.
# ------------------------------------------------------------------
-body SrcTextWin::UnLoadFromCache {w oldpane name asm lib} {
+itcl::body SrcTextWin::UnLoadFromCache {w oldpane name asm lib} {
# debug "$w $oldpane $name"
upvar ${w}win win
upvar _${w}pane pane
@@ -2799,7 +2799,7 @@ body SrcTextWin::UnLoadFromCache {w oldpane name asm lib} {
# ------------------------------------------------------------------
# METHOD: print - print the contents of the text widget
# ------------------------------------------------------------------
-body SrcTextWin::print {top} {
+itcl::body SrcTextWin::print {top} {
# FIXME
send_printer -ascii [$twin get 1.0 end] -parent $top
}
@@ -2807,7 +2807,7 @@ body SrcTextWin::print {top} {
# ------------------------------------------------------------------
# METHOD: ask_thread_bp - prompt for thread(s) for BP
# ------------------------------------------------------------------
-body SrcTextWin::ask_thread_bp {} {
+itcl::body SrcTextWin::ask_thread_bp {} {
# debug
if {[catch {gdb_cmd "info thread"} threads]} {
# failed. Just leave
@@ -2858,7 +2858,7 @@ body SrcTextWin::ask_thread_bp {} {
# ------------------------------------------------------------------
# METHOD: do_thread_bp - callback from thread selection
# ------------------------------------------------------------------
-body SrcTextWin::do_thread_bp {listbox} {
+itcl::body SrcTextWin::do_thread_bp {listbox} {
# debug "$listbox [$listbox curselection]"
set x ""
foreach i [$listbox curselection] {
@@ -2870,7 +2870,7 @@ body SrcTextWin::do_thread_bp {listbox} {
# public method for testing use only!
-body SrcTextWin::test_get {var} {
+itcl::body SrcTextWin::test_get {var} {
if {[array exists $var]} {
return [array get $var]
} else {
@@ -2881,7 +2881,7 @@ body SrcTextWin::test_get {var} {
# ------------------------------------------------------------------
# METHOD: get_file - Return name of current file.
# ------------------------------------------------------------------
-body SrcTextWin::get_file {} {
+itcl::body SrcTextWin::get_file {} {
return $current(filename)
}
@@ -2893,7 +2893,7 @@ body SrcTextWin::get_file {} {
# Delete the variable balloon if it exists.
# Clear the screen.
# ------------------------------------------------------------------
-body SrcTextWin::clear_file {} {
+itcl::body SrcTextWin::clear_file {} {
debug "In clear_file"
# delete all caches
@@ -2920,7 +2920,7 @@ body SrcTextWin::clear_file {} {
}
-body SrcTextWin::_initialize_srctextwin {} {
+itcl::body SrcTextWin::_initialize_srctextwin {} {
set pc(filename) ""
set pc(func) ""
set pc(line) 0
@@ -2940,7 +2940,7 @@ body SrcTextWin::_initialize_srctextwin {} {
# ------------------------------------------------------------------
# METHOD: _clear_cache - Clear the cache
# ------------------------------------------------------------------
-body SrcTextWin::_clear_cache {} {
+itcl::body SrcTextWin::_clear_cache {} {
# display empty scratch frame
set pane $Stwc(gdbtk_scratch_widget:pane)
diff --git a/gdb/gdbtk/library/srctextwin.ith b/gdb/gdbtk/library/srctextwin.ith
index d2ff09b425b..d13a9799044 100644
--- a/gdb/gdbtk/library/srctextwin.ith
+++ b/gdb/gdbtk/library/srctextwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class SrcTextWin {
+itcl::class SrcTextWin {
inherit itk::Widget GDBWin
public {
diff --git a/gdb/gdbtk/library/srcwin.itb b/gdb/gdbtk/library/srcwin.itb
index e6c79cf1223..d4ab32d0846 100644
--- a/gdb/gdbtk/library/srcwin.itb
+++ b/gdb/gdbtk/library/srcwin.itb
@@ -15,7 +15,7 @@
# ------------------------------------------------------------------
# CONSTRUCTOR - create new source window
# ------------------------------------------------------------------
-body SrcWin::constructor {args} {
+itcl::body SrcWin::constructor {args} {
debug "$args"
eval itk_initialize $args
set top [winfo toplevel $itk_interior]
@@ -52,7 +52,7 @@ body SrcWin::constructor {args} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body SrcWin::destructor {} {
+itcl::body SrcWin::destructor {} {
debug
remove_hook gdb_no_inferior_hook "$this no_inferior"
remove_hook download_progress_hook "$this download_progress"
@@ -67,7 +67,7 @@ body SrcWin::destructor {} {
# ------------------------------------------------------------------
# PRIVATE METHOD: _build_win - build the main source window
# ------------------------------------------------------------------
-body SrcWin::_build_win {} {
+itcl::body SrcWin::_build_win {} {
global gdb_downloading gdb_running gdb_loaded
# build source toolbar
@@ -185,7 +185,7 @@ body SrcWin::_build_win {} {
# ------------------------------------------------------------------
# PUBLIC METHOD: _set_state - do things when program state changes
# ------------------------------------------------------------------
-body SrcWin::_set_state {varname} {
+itcl::body SrcWin::_set_state {varname} {
global gdb_running gdb_downloading gdb_loaded gdb_program_has_run
debug "$varname l=$gdb_loaded d=$gdb_downloading r=$gdb_running"
@@ -209,7 +209,7 @@ body SrcWin::_set_state {varname} {
# ------------------------------------------------------------------
# PUBLIC METHOD: download_progress - update the progress meter when downloading
# ------------------------------------------------------------------
-body SrcWin::download_progress { section num tot {msg ""} } {
+itcl::body SrcWin::download_progress { section num tot {msg ""} } {
global download_start_time download_cancel_ok gdb_loaded
#debug "$section $num $tot $msg"
@@ -277,7 +277,7 @@ body SrcWin::download_progress { section num tot {msg ""} } {
# ------------------------------------------------------------------
# PUBLIC METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body SrcWin::reconfig {} {
+itcl::body SrcWin::reconfig {} {
debug
$_toolbar reconfig
$twin reconfig
@@ -290,7 +290,7 @@ body SrcWin::reconfig {} {
# It is the only way that files can be inserted into the file list
# once the debugger is started.
# ------------------------------------------------------------------
-body SrcWin::_name {w {val ""}} {
+itcl::body SrcWin::_name {w {val ""}} {
global _files
debug "$w $val"
if {$val != ""} {
@@ -322,7 +322,7 @@ body SrcWin::_name {w {val ""}} {
# ------------------------------------------------------------------
# PRIVATE PUBLIC METHOD: toggle_updates - update toggle callback
# ------------------------------------------------------------------
-body SrcWin::toggle_updates {value} {
+itcl::body SrcWin::toggle_updates {value} {
# save state in do_updates so it will be preserved
# in window reconfigs
set do_updates $value
@@ -331,7 +331,7 @@ body SrcWin::toggle_updates {value} {
# ------------------------------------------------------------------
# PRIVATE PUBLIC METHOD: goto_func - function combobox callback
# ------------------------------------------------------------------
-body SrcWin::goto_func {w {val ""}} {
+itcl::body SrcWin::goto_func {w {val ""}} {
if {$val != ""} {
set mang 0
if {[info exists _mangled_func($val)]} {
@@ -362,7 +362,7 @@ body SrcWin::goto_func {w {val ""}} {
# This method needs to be public, since other parts of
# the gui can cause new symbols to be read.
# ------------------------------------------------------------------
-body SrcWin::fillNameCB {} {
+itcl::body SrcWin::fillNameCB {} {
global _files
set allfiles [gdb_listfiles]
foreach f $allfiles {
@@ -383,7 +383,7 @@ body SrcWin::fillNameCB {} {
# This method needs to be public, since other parts of
# the gui can cause new symbols to be read.
# ------------------------------------------------------------------
-body SrcWin::fillFuncCB {name} {
+itcl::body SrcWin::fillFuncCB {name} {
$_statbar.func list delete 0 end
if {$name != ""} {
set maxlen 10
@@ -421,7 +421,7 @@ body SrcWin::fillFuncCB {name} {
#
# linespec will be "{} {} {} 0 0x0 0x0" when GDB has not started debugging.
# ------------------------------------------------------------------
-body SrcWin::location {tag linespec} {
+itcl::body SrcWin::location {tag linespec} {
global gdb_running gdb_exe_name _files tcl_platform
# We need to keep track of changes to the line, filename, function name
@@ -488,7 +488,7 @@ body SrcWin::location {tag linespec} {
# ------------------------------------------------------------------
# PUBLIC METHOD: stack - handle stack commands
# ------------------------------------------------------------------
-body SrcWin::stack {cmd} {
+itcl::body SrcWin::stack {cmd} {
if {$cmd == "bottom"} {
set cmd "frame 0"
}
@@ -503,7 +503,7 @@ body SrcWin::stack {cmd} {
# ------------------------------------------------------------------
# METHOD: _update - update widget when PC changes
# ------------------------------------------------------------------
-body SrcWin::_update {loc} {
+itcl::body SrcWin::_update {loc} {
debug "loc=$loc"
# See if name combobox needs filled.
if {$need_files} {
@@ -516,7 +516,7 @@ body SrcWin::_update {loc} {
# PUBLIC METHOD: idle - callback for gdbtk_idle
# Called when the target is idle, so enable all buttons.
# ------------------------------------------------------------------
-body SrcWin::idle {event} {
+itcl::body SrcWin::idle {event} {
$_toolbar configure -runstop normal
enable_ui 1
}
@@ -524,7 +524,7 @@ body SrcWin::idle {event} {
# ------------------------------------------------------------------
# PUBLIC METHOD: mode - set mode to SOURCE, ASSEMBLY, MIXED, SRC+ASM
# ------------------------------------------------------------------
-body SrcWin::mode {w new_mode {go 1}} {
+itcl::body SrcWin::mode {w new_mode {go 1}} {
gdbtk_busy
$_statbar.mode entryset $new_mode
catch {$twin mode_set $new_mode $go} errorVal
@@ -535,7 +535,7 @@ body SrcWin::mode {w new_mode {go 1}} {
# ------------------------------------------------------------------
# PRIVATE METHOD: _update_title - update title bar
# ------------------------------------------------------------------
-body SrcWin::_update_title {name} {
+itcl::body SrcWin::_update_title {name} {
set fn [lindex [::file split $name] end]
if {$fn == ""} {
set prefix ""
@@ -548,7 +548,7 @@ body SrcWin::_update_title {name} {
# ------------------------------------------------------------------
# PUBLIC METHOD: busy - disable things when gdb is busy
# ------------------------------------------------------------------
-body SrcWin::busy {event} {
+itcl::body SrcWin::busy {event} {
global gdb_loaded gdb_target_name
# debug "gdb_loaded=$gdb_loaded, gdb_target_name=$gdb_target_name"
@@ -569,7 +569,7 @@ body SrcWin::busy {event} {
# ------------------------------------------------------------------
# PUBLIC METHOD: update - The inferior's state has changed.
# ------------------------------------------------------------------
-body SrcWin::update {event} {
+itcl::body SrcWin::update {event} {
# FIXME: This is kinda lame. We need to run this only once
# as it is now written, so only the first window in the list
@@ -585,7 +585,7 @@ body SrcWin::update {event} {
# ------------------------------------------------------------------
# PRIVATE METHOD: _set_name - set the name in the name combobox and in the title
# ------------------------------------------------------------------
-body SrcWin::_set_name { val {found 1} } {
+itcl::body SrcWin::_set_name { val {found 1} } {
global _files
_update_title $val
if {![info exists _files(short,$val)]} {
@@ -609,7 +609,7 @@ body SrcWin::_set_name { val {found 1} } {
# If "tmp" is set, the status change will not be saved.
# ------------------------------------------------------------------
-body SrcWin::set_status { {msg ""} {tmp 0} } {
+itcl::body SrcWin::set_status { {msg ""} {tmp 0} } {
set msg [lindex [split $msg \n] 0]
if {$tmp} {
$_status configure -text $msg
@@ -625,7 +625,7 @@ body SrcWin::set_status { {msg ""} {tmp 0} } {
# PUBLIC METHOD: set_execution_status - write the current execution state
# to the status line
# ------------------------------------------------------------------
-body SrcWin::set_execution_status { {line ""} {pc ""}} {
+itcl::body SrcWin::set_execution_status { {line ""} {pc ""}} {
global gdb_running gdb_loaded gdb_program_has_run gdb_target_changed
#debug "line=$line pc=$pc [gdb_target_has_execution] running=$gdb_running loaded=$gdb_loaded"
set message ""
@@ -699,7 +699,7 @@ body SrcWin::set_execution_status { {line ""} {pc ""}} {
# ------------------------------------------------------------------
# PUBLIC METHOD: edit - invoke external editor
# ------------------------------------------------------------------
-body SrcWin::edit {} {
+itcl::body SrcWin::edit {} {
global external_editor_command
# If external editor is enabled, pass the file to the specified command
@@ -719,7 +719,7 @@ body SrcWin::edit {} {
# ------------------------------------------------------------------
# PUBLIC METHOD: print - print the contents of the text widget
# ------------------------------------------------------------------
-body SrcWin::print {} {
+itcl::body SrcWin::print {} {
# Call the SrcTextWin's print public method
$twin print $top
}
@@ -728,7 +728,7 @@ body SrcWin::print {} {
# PUBLIC METHOD: enable_ui
# Enable all UI elements for user interaction.
# ------------------------------------------------------------------
-body SrcWin::enable_ui { on } {
+itcl::body SrcWin::enable_ui { on } {
#debug "$on"
if {$on} {
set Running 0
@@ -764,7 +764,7 @@ body SrcWin::enable_ui { on } {
#
# Change mouse pointer to normal
# ------------------------------------------------------------------
-body SrcWin::no_inferior {} {
+itcl::body SrcWin::no_inferior {} {
#debug
set_execution_status
enable_ui 1
@@ -773,7 +773,7 @@ body SrcWin::no_inferior {} {
# ------------------------------------------------------------------
# PUBLIC METHOD: reset - reset the source window
# ------------------------------------------------------------------
-body SrcWin::reset {} {
+itcl::body SrcWin::reset {} {
set current(filename) ""
set need_files 1
set do_updates 1
@@ -795,7 +795,7 @@ body SrcWin::reset {} {
# PUBLIC METHOD: search - search for a STRING or jump to a specific line
# in source window, going in the specified DIRECTION.
# ------------------------------------------------------------------
-body SrcWin::search {direction string} {
+itcl::body SrcWin::search {direction string} {
set_status
set_status [$twin search $string $direction] 1
}
@@ -805,7 +805,7 @@ body SrcWin::search {direction string} {
# Proc that may be called to point some source window to
# main (or an entry point?). (see gdbtk_tcl_exec_file_changed)
# ------------------------------------------------------------------
-body SrcWin::point_to_main {} {
+itcl::body SrcWin::point_to_main {} {
# We need to force this to some default location. Assume main and
# if that fails, let the source window guess (via gdb_loc using stop_pc).
set src [lindex [ManagedWin::find SrcWin] 0]
@@ -817,7 +817,7 @@ body SrcWin::point_to_main {} {
}
}
-body SrcWin::_exit {} {
+itcl::body SrcWin::_exit {} {
debug
if {[llength [ManagedWin::find SrcWin]] == 1} {
if {![gdbtk_quit_check]} {
@@ -828,7 +828,7 @@ body SrcWin::_exit {} {
}
# public method for testing use only!
-body SrcWin::test_get {var {private_func 0}} {
+itcl::body SrcWin::test_get {var {private_func 0}} {
debug $var
if {$private_func} {
return [code $this $var]
@@ -848,7 +848,7 @@ body SrcWin::test_get {var {private_func 0}} {
# running - Stop button appears, allowing user to stop executing target
# downloading - Stop button appears, allowing user to interrupt downloading
# normal - Run button appears, allowing user to run/re-run exe
-body SrcWin::toolbar {state} {
+itcl::body SrcWin::toolbar {state} {
$_toolbar configure -runstop $state
}
@@ -868,7 +868,7 @@ body SrcWin::toolbar {state} {
#
# FIXME: This should really be in an object which describes gdb's state.
# Unfortunately, this doesn't exist, so it's here for now.
-body SrcWin::inferior {action} {
+itcl::body SrcWin::inferior {action} {
switch $action {
step { gdbtk_step }
@@ -899,7 +899,7 @@ body SrcWin::inferior {action} {
# - clear status (done by no_inferior)
# - allow SrcTextWin to clear_file
# ------------------------------------------------------------------
-body SrcWin::clear_file {} {
+itcl::body SrcWin::clear_file {} {
# Reset to Source mode
if {[$twin mode_get] != "SOURCE"} {
@@ -917,7 +917,7 @@ body SrcWin::clear_file {} {
# METHOD: get_file
# Return name of displayed file, or empty string if no file.
# ------------------------------------------------------------------
-body SrcWin::get_file {} {
+itcl::body SrcWin::get_file {} {
if {$twin == ""} {
return ""
} else {
@@ -929,7 +929,7 @@ body SrcWin::get_file {} {
# METHOD: is_fixed
# Return boolean indicating whether this window is fixed.
# ------------------------------------------------------------------
-body SrcWin::is_fixed {} {
+itcl::body SrcWin::is_fixed {} {
return 0
}
@@ -937,7 +937,7 @@ body SrcWin::is_fixed {} {
# METHOD: get_top
# Return toplevel
# ------------------------------------------------------------------
-body SrcWin::get_top {} {
+itcl::body SrcWin::get_top {} {
return $top
}
@@ -945,7 +945,7 @@ body SrcWin::get_top {} {
# METHOD: _set_tag_to_stack
# Set tag to `stack' and update the underlying window.
# ------------------------------------------------------------------
-body SrcWin::_set_tag_to_stack {} {
+itcl::body SrcWin::_set_tag_to_stack {} {
set tag STACK_TAG
if {$twin != ""} then {
$twin set_tag_to_stack
@@ -956,7 +956,7 @@ body SrcWin::_set_tag_to_stack {} {
# METHOD: _choose_window
# Choose the right source window.
# ------------------------------------------------------------------
-body SrcWin::_choose_window {file} {
+itcl::body SrcWin::_choose_window {file} {
# Find the next available source window. The rules are:
# 1. LRU overall
# 2. Skip iconified windows
@@ -999,7 +999,7 @@ body SrcWin::_choose_window {file} {
# METHOD: choose_and_update
# Choose the right source window and then cause it to be updated
# ------------------------------------------------------------------
-body SrcWin::choose_and_update {} {
+itcl::body SrcWin::choose_and_update {} {
if {$pc_window == ""} then {
set pc_window [lindex $window_list 0]
}
@@ -1025,7 +1025,7 @@ body SrcWin::choose_and_update {} {
# METHOD: choose_and_display
# Choose the right source window for a given file
# ------------------------------------------------------------------
-body SrcWin::choose_and_display {tag linespec} {
+itcl::body SrcWin::choose_and_display {tag linespec} {
set file [lindex $linespec 2]
set window [_choose_window $file]
$window location $tag $linespec
diff --git a/gdb/gdbtk/library/srcwin.ith b/gdb/gdbtk/library/srcwin.ith
index 578178765f8..65d2033fb2b 100644
--- a/gdb/gdbtk/library/srcwin.ith
+++ b/gdb/gdbtk/library/srcwin.ith
@@ -23,7 +23,7 @@
# should be returned and SrcWin should figure out what to do.
# ----------------------------------------------------------------------
-class SrcWin {
+itcl::class SrcWin {
inherit TopLevelWin GDBWin
public {
diff --git a/gdb/gdbtk/library/stackwin.itb b/gdb/gdbtk/library/stackwin.itb
index d8a10846da9..971f6727f9a 100644
--- a/gdb/gdbtk/library/stackwin.itb
+++ b/gdb/gdbtk/library/stackwin.itb
@@ -15,7 +15,7 @@
# ------------------------------------------------------------------
# CONSTRUCTOR - create new stack window
# ------------------------------------------------------------------
-body StackWin::constructor {args} {
+itcl::body StackWin::constructor {args} {
gdbtk_busy
build_win
gdbtk_idle
@@ -26,14 +26,14 @@ body StackWin::constructor {args} {
# ------------------------------------------------------------------
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
-body StackWin::destructor {} {
+itcl::body StackWin::destructor {} {
remove_hook gdb_no_inferior_hook [code $this no_inferior]
}
# ------------------------------------------------------------------
# METHOD: build_win - build the main register window
# ------------------------------------------------------------------
-body StackWin::build_win {} {
+itcl::body StackWin::build_win {} {
global tcl_platform
itk_component add slb {
@@ -63,7 +63,7 @@ body StackWin::build_win {} {
# ------------------------------------------------------------------
# METHOD: update - update widget when PC changes
# ------------------------------------------------------------------
-body StackWin::update {event} {
+itcl::body StackWin::update {event} {
global gdb_selected_frame_level
if {!$protect_me} {
@@ -102,16 +102,16 @@ body StackWin::update {event} {
}
}
-body StackWin::idle {event} {
+itcl::body StackWin::idle {event} {
set Running 0
cursor {}
}
# ------------------------------------------------------------------
# METHOD: change_frame - change the current frame
-# This body StackWin::is currently ONLY called from the mouse binding
+# This method is currently ONLY called from the mouse binding
# ------------------------------------------------------------------
-body StackWin::change_frame {} {
+itcl::body StackWin::change_frame {} {
if {!$Running && [$itk_component(slb) size] != 0} {
gdbtk_busy
@@ -131,7 +131,7 @@ body StackWin::change_frame {} {
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body StackWin::reconfig {} {
+itcl::body StackWin::reconfig {} {
destroy $itk_interior.s
if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
build_win
@@ -142,7 +142,7 @@ body StackWin::reconfig {} {
# This method should cause blocking of clicks in
# the window and change mouse pointer.
# ------------------------------------------------------------------
-body StackWin::busy {event} {
+itcl::body StackWin::busy {event} {
set Running 1
cursor watch
}
@@ -150,17 +150,17 @@ body StackWin::busy {event} {
# ------------------------------------------------------------------
# METHOD: no_inferior - gdb_no_inferior_hook
# ------------------------------------------------------------------
-body StackWin::no_inferior {} {
+itcl::body StackWin::no_inferior {} {
set Running 0
cursor {}
}
# ------------------------------------------------------------------
# METHOD: cursor - set the window cursor
-# This is a convenience body StackWin::which simply sets the mouse
+# This is a convenience method which simply sets the mouse
# pointer to the given glyph.
# ------------------------------------------------------------------
-body StackWin::cursor {glyph} {
+itcl::body StackWin::cursor {glyph} {
set top [winfo toplevel $itk_interior]
$top configure -cursor $glyph
}
diff --git a/gdb/gdbtk/library/stackwin.ith b/gdb/gdbtk/library/stackwin.ith
index fca984d4966..4bb140ef061 100644
--- a/gdb/gdbtk/library/stackwin.ith
+++ b/gdb/gdbtk/library/stackwin.ith
@@ -16,7 +16,7 @@
# Implements stack window for gdb
# ----------------------------------------------------------------------
-class StackWin {
+itcl::class StackWin {
inherit EmbeddedWin GDBWin
private {
diff --git a/gdb/gdbtk/library/targetselection.itb b/gdb/gdbtk/library/targetselection.itb
index e439a118377..00accfe4f3c 100644
--- a/gdb/gdbtk/library/targetselection.itb
+++ b/gdb/gdbtk/library/targetselection.itb
@@ -19,14 +19,14 @@
# ------------------------------------------------------------------
# CONSTRUCTOR - create new target selection window
# ------------------------------------------------------------------
-body TargetSelection::constructor {args} {
+itcl::body TargetSelection::constructor {args} {
eval itk_initialize $args
set top [winfo toplevel $itk_interior]
_init
build_win
}
-body TargetSelection::getname {target name} {
+itcl::body TargetSelection::getname {target name} {
# Init target database if we haven't already done so
init_target_db
@@ -38,7 +38,7 @@ body TargetSelection::getname {target name} {
}
}
-body TargetSelection::init_target_db {} {
+itcl::body TargetSelection::init_target_db {} {
# check to see if we already initialized this database
if {$db_inited} {
return
@@ -278,7 +278,7 @@ body TargetSelection::init_target_db {} {
set gdb_target(gdbservertcp,after_attaching) {}
}
-body TargetSelection::default_port {} {
+itcl::body TargetSelection::default_port {} {
global tcl_platform
switch -regexp $tcl_platform(os) {
Windows { set port com1 }
@@ -304,7 +304,7 @@ body TargetSelection::default_port {} {
}
-body TargetSelection::_init_prefs {} {
+itcl::body TargetSelection::_init_prefs {} {
if {$prefs_inited} {
return
@@ -325,7 +325,7 @@ body TargetSelection::_init_prefs {} {
pref define gdb/load/default-after_attaching {}
}
-body TargetSelection::_init_target {} {
+itcl::body TargetSelection::_init_target {} {
global gdb_target_name
set target_list [get_target_list]
set target $gdb_target_name
@@ -362,7 +362,7 @@ body TargetSelection::_init_target {} {
}
}
-body TargetSelection::_init {} {
+itcl::body TargetSelection::_init {} {
if {!$trace_inited} {
# Trace all gdb_loaded changes based on target
@@ -385,7 +385,7 @@ body TargetSelection::_init {} {
# ------------------------------------------------------------------
# METHOD: build_win - build the dialog
# ------------------------------------------------------------------
-body TargetSelection::build_win {} {
+itcl::body TargetSelection::build_win {} {
global tcl_platform PREFS_state gdb_ImageDir gdb_target_name
set f [frame $itk_interior.f]
@@ -614,7 +614,7 @@ body TargetSelection::build_win {} {
# ------------------------------------------------------------------
# METHOD: set_saved - set saved values
# ------------------------------------------------------------------
-body TargetSelection::set_saved {} {
+itcl::body TargetSelection::set_saved {} {
set saved_baud [pref get gdb/load/$target-baud]
set saved_port [pref get gdb/load/$target-port]
set saved_main [pref get gdb/load/main]
@@ -637,7 +637,7 @@ body TargetSelection::set_saved {} {
# ------------------------------------------------------------------
# METHOD: write_saved - write saved values to preferences
# ------------------------------------------------------------------
-body TargetSelection::write_saved {} {
+itcl::body TargetSelection::write_saved {} {
pref setd gdb/load/$target-baud $saved_baud
pref setd gdb/load/$target-port $saved_port
pref setd gdb/load/main $saved_main
@@ -659,7 +659,7 @@ body TargetSelection::write_saved {} {
# ------------------------------------------------------------------
# METHOD: fill_rates - fill baud rate combobox
# ------------------------------------------------------------------
-body TargetSelection::fill_rates {} {
+itcl::body TargetSelection::fill_rates {} {
$fr.cb list delete 0 end
if {$gdb_target($target,baud-rates) != ""} {
@@ -672,7 +672,7 @@ body TargetSelection::fill_rates {} {
# ------------------------------------------------------------------
# METHOD: fill_targets - fill target combobox
# ------------------------------------------------------------------
-body TargetSelection::fill_targets {} {
+itcl::body TargetSelection::fill_targets {} {
#[$fr.tar subwidget listbox] delete 0 end
$fr.tar list delete 0 end
@@ -692,7 +692,7 @@ body TargetSelection::fill_targets {} {
# METHOD: config_dialog - Convenience method to map/unmap/rename
# components onto the screen based on target T.
# ------------------------------------------------------------------
-body TargetSelection::config_dialog {t} {
+itcl::body TargetSelection::config_dialog {t} {
pref define gdb/load/$t-verbose [pref get gdb/load/verbose]
$f.fr.verb config -variable [pref varname gdb/load/$t-verbose]
# Map the correct entries and comboboxes onto the screen
@@ -788,7 +788,7 @@ body TargetSelection::config_dialog {t} {
# ------------------------------------------------------------------
# METHOD: change_target - callback for target combobox
# ------------------------------------------------------------------
-body TargetSelection::change_target {w {name ""}} {
+itcl::body TargetSelection::change_target {w {name ""}} {
if {$name == ""} {return}
set target [get_target $name]
@@ -845,7 +845,7 @@ body TargetSelection::change_target {w {name ""}} {
# PRIVATE METHOD: change_baud - called when the baud rate is changed.
# If GDB is running, set baud rate in GDB and read it back.
# ------------------------------------------------------------------
-body TargetSelection::change_baud {w {baud ""}} {
+itcl::body TargetSelection::change_baud {w {baud ""}} {
if {$baud != ""} {
if {([string compare $baud "TCP"] != 0)
&& ([string compare $baud "ETH"] != 0)} {
@@ -870,7 +870,7 @@ body TargetSelection::change_baud {w {baud ""}} {
# ------------------------------------------------------------------
# METHOD: port_list - return a list of valid ports for Windows
# ------------------------------------------------------------------
-body TargetSelection::port_list {} {
+itcl::body TargetSelection::port_list {} {
set plist ""
# Scan com1 - com8 trying to open each one.
# If permission is denied that means it is in use,
@@ -897,7 +897,7 @@ body TargetSelection::port_list {} {
# METHOD: get_target_list - return a list of targets supported
# by this GDB. Parses the output of "help target"
# ------------------------------------------------------------------
-body TargetSelection::get_target_list {} {
+itcl::body TargetSelection::get_target_list {} {
set native [native_debugging]
set names ""
set res [gdb_cmd "help target"]
@@ -919,7 +919,7 @@ body TargetSelection::get_target_list {} {
# ------------------------------------------------------------------
# METHOD: save - save values
# ------------------------------------------------------------------
-body TargetSelection::save {} {
+itcl::body TargetSelection::save {} {
global gdb_target_name
set err [catch {
set_saved
@@ -941,7 +941,7 @@ body TargetSelection::save {} {
# ------------------------------------------------------------------
# METHOD: cancel - restore previous values
# ------------------------------------------------------------------
-body TargetSelection::cancel {} {
+itcl::body TargetSelection::cancel {} {
global gdb_target_name
catch {gdb_cmd "set remotebaud $saved_baud"}
@@ -958,7 +958,7 @@ body TargetSelection::cancel {} {
# ------------------------------------------------------------------
# METHOD: set_check_button - enable/disable compare-section command
# ------------------------------------------------------------------
-body TargetSelection::set_check_button {name} {
+itcl::body TargetSelection::set_check_button {name} {
if {[winfo exists $itk_interior.f.fr.check]} {
if { $name == "exec" } {
$itk_interior.f.fr.check configure -state disabled
@@ -971,13 +971,13 @@ body TargetSelection::set_check_button {name} {
# ------------------------------------------------------------------
# METHOD: help - launches context sensitive help.
# ------------------------------------------------------------------
-body TargetSelection::help {} {
+itcl::body TargetSelection::help {} {
}
# ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
-body TargetSelection::reconfig {} {
+itcl::body TargetSelection::reconfig {} {
# for now, just delete and recreate
destroy $itk_interior.f
build_win
@@ -987,7 +987,7 @@ body TargetSelection::reconfig {} {
# METHOD: get_target - get the internal name of a target from the
# pretty-name
# ------------------------------------------------------------------
-body TargetSelection::get_target {name} {
+itcl::body TargetSelection::get_target {name} {
set t {}
set list [array get gdb_target *,pretty-name]
set i [lsearch -exact $list $name]
@@ -1004,7 +1004,7 @@ body TargetSelection::get_target {name} {
# METHOD: toggle_more_options -- toggle displaying the More/Fewer
# Options pane
# ------------------------------------------------------------------
-body TargetSelection::toggle_more_options {} {
+itcl::body TargetSelection::toggle_more_options {} {
if {[$MoreLabel cget -text] == "More Options"} {
$MoreLabel configure -text "Fewer Options"
$MoreButton configure -image _LESS_
@@ -1023,7 +1023,7 @@ body TargetSelection::toggle_more_options {} {
# METHOD: set_run - set the run button. Make sure not both run and
# continue are selected.
# ------------------------------------------------------------------
-body TargetSelection::set_run {check_which} {
+itcl::body TargetSelection::set_run {check_which} {
global PREFS_state
set var [pref varname gdb/src/run_$check_which]
global $var
@@ -1038,7 +1038,7 @@ body TargetSelection::set_run {check_which} {
# and possible more) whenever the value of gdb_loaded
# is changed based on the current target.
# ------------------------------------------------------------------
-body TargetSelection::target_trace {variable index op} {
+itcl::body TargetSelection::target_trace {variable index op} {
global gdb_target_name gdb_loaded
switch $gdb_target_name {
@@ -1051,7 +1051,7 @@ body TargetSelection::target_trace {variable index op} {
}
# Returns 1 if TARGET is a _runnable_ target for this gdb.
-body TargetSelection::valid_target {target} {
+itcl::body TargetSelection::valid_target {target} {
# always allow gdbserver
if {$target == "gdbserver"} {return 1}
@@ -1071,7 +1071,7 @@ body TargetSelection::valid_target {target} {
}
# Returns 1 if this is not a cross debugger.
-body TargetSelection::native_debugging {} {
+itcl::body TargetSelection::native_debugging {} {
global GDBStartup
set r [string compare $GDBStartup(host_name) $GDBStartup(target_name)]
diff --git a/gdb/gdbtk/library/targetselection.ith b/gdb/gdbtk/library/targetselection.ith
index 7304dd3e080..aed0b8d7bb5 100644
--- a/gdb/gdbtk/library/targetselection.ith
+++ b/gdb/gdbtk/library/targetselection.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class TargetSelection {
+itcl::class TargetSelection {
inherit ModalDialog ManagedWin
private {
diff --git a/gdb/gdbtk/library/tdump.tcl b/gdb/gdbtk/library/tdump.tcl
index a93ee6494b2..1f1701533d6 100644
--- a/gdb/gdbtk/library/tdump.tcl
+++ b/gdb/gdbtk/library/tdump.tcl
@@ -28,7 +28,7 @@
#
# ----------------------------------------------------------------------
-class TdumpWin {
+itcl::class TdumpWin {
inherit ManagedWin GDBWin
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/toolbar.tcl b/gdb/gdbtk/library/toolbar.tcl
index 2b3f87ce4c8..aa0a7424199 100644
--- a/gdb/gdbtk/library/toolbar.tcl
+++ b/gdb/gdbtk/library/toolbar.tcl
@@ -20,7 +20,7 @@
# and button sets. It does not actually add any buttons or
# menus on its own, however.
-class oldGDBToolBar {
+itcl::class oldGDBToolBar {
inherit itk::Widget
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/toplevelwin.ith b/gdb/gdbtk/library/toplevelwin.ith
index 2b947d2a7fe..0a3f4ad18b7 100644
--- a/gdb/gdbtk/library/toplevelwin.ith
+++ b/gdb/gdbtk/library/toplevelwin.ith
@@ -12,7 +12,7 @@
# GNU General Public License for more details.
-class TopLevelWin {
+itcl::class TopLevelWin {
inherit ManagedWin
private variable frame ""
diff --git a/gdb/gdbtk/library/tracedlg.tcl b/gdb/gdbtk/library/tracedlg.tcl
index 4be0ae51106..f34b8a975a0 100644
--- a/gdb/gdbtk/library/tracedlg.tcl
+++ b/gdb/gdbtk/library/tracedlg.tcl
@@ -26,7 +26,7 @@
# either one if a tracepoint was set/edited successfully or zero if
# the user bails out (cancel or destroy buttons).
-class TraceDlg {
+itcl::class TraceDlg {
inherit ManagedWin
# ------------------------------------------------------------------
diff --git a/gdb/gdbtk/library/variables.tcl b/gdb/gdbtk/library/variables.tcl
index 244be7caa6d..2faeb2f686f 100644
--- a/gdb/gdbtk/library/variables.tcl
+++ b/gdb/gdbtk/library/variables.tcl
@@ -18,7 +18,7 @@
# 'getVariablesBlankPath' and a few other things...
# ----------------------------------------------------------------------
-class VariableWin {
+itcl::class VariableWin {
inherit EmbeddedWin GDBWin
protected variable Sizebox 1
@@ -815,16 +815,16 @@ class VariableWin {
# OVERRIDE THIS METHOD and call it from there
# ------------------------------------------------------------------
method update {event} {
- global Update
- debug
+ global Update
+ debug
- # First, reset color on label to normal
- foreach w $ChangeList {
- catch {
- $Hlist entryconfigure $w -style $NormalTextStyle
- }
+ # First, reset color on label to normal
+ foreach w $ChangeList {
+ catch {
+ $Hlist entryconfigure $w -style $NormalTextStyle
}
-
+ }
+
# Tell toplevel variables to update themselves. This will
# give us a list of all the variables in the table that
# have changed values.
diff --git a/gdb/gdbtk/library/warning.tcl b/gdb/gdbtk/library/warning.tcl
index 1aee2830a98..0e1a82342b0 100644
--- a/gdb/gdbtk/library/warning.tcl
+++ b/gdb/gdbtk/library/warning.tcl
@@ -31,7 +31,7 @@
# -----------------------------------------------------------------------------
#
-class WarningDlg {
+itcl::class WarningDlg {
inherit ManagedWin ModalDialog
public {
@@ -50,7 +50,7 @@ class WarningDlg {
# DESC:
# Creates the warning dialog.
# -----------------------------------------------------------------------------
-body WarningDlg::constructor {args} {
+itcl::body WarningDlg::constructor {args} {
debug $args
window_name "Warning"
eval itk_initialize $args
diff --git a/gdb/gdbtk/library/watch.tcl b/gdb/gdbtk/library/watch.tcl
index 135b9237940..94d41bc496c 100644
--- a/gdb/gdbtk/library/watch.tcl
+++ b/gdb/gdbtk/library/watch.tcl
@@ -17,7 +17,7 @@
# class from variables.tcl.
# ----------------------------------------------------------------------
-class WatchWin {
+itcl::class WatchWin {
inherit VariableWin
# ------------------------------------------------------------------