From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3218 invoked by alias); 15 Oct 2002 21:19:06 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 3211 invoked from network); 15 Oct 2002 21:19:05 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 15 Oct 2002 21:19:05 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9FKwVw23719 for ; Tue, 15 Oct 2002 16:58:31 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9FLJ4f31190 for ; Tue, 15 Oct 2002 17:19:04 -0400 Received: from localhost.localdomain (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9FLIuT16528 for ; Tue, 15 Oct 2002 17:18:56 -0400 From: "Martin M. Hunt" Organization: Red Hat Inc To: insight@sources.redhat.com Subject: [patch] fix to rebuild tclIndex Date: Tue, 15 Oct 2002 14:19:00 -0000 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_GHK1655UODPCRBH9IIGD" Message-Id: <200210151417.40592.hunt@redhat.com> X-SW-Source: 2002-q4/txt/msg00045.txt.bz2 --------------Boundary-00=_GHK1655UODPCRBH9IIGD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-length: 384 This patch is just so we can rebuild tclIndex. -- Martin Hunt GDB Engineer Red Hat, Inc. 2002-10-15 Martin M. Hunt * 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 --------------Boundary-00=_GHK1655UODPCRBH9IIGD Content-Type: text/x-diff; charset="us-ascii"; name="p" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p" Content-length: 198411 Index: library/Makefile =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- library/Makefile 11 Jan 2002 04:24:39 -0000 1.3 +++ library/Makefile 15 Oct 2002 21:09:44 -0000 @@ -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) Index: library/about.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/about.tcl,v retrieving revision 1.2 diff -u -r1.2 about.tcl --- library/about.tcl 2 Feb 2001 02:41:45 -0000 1.2 +++ library/about.tcl 15 Oct 2002 21:09:44 -0000 @@ -16,7 +16,7 @@ # Implements About window # ---------------------------------------------------------------------- -class About { +itcl::class About { inherit ManagedWin ModalDialog constructor {args} { global gdb_ImageDir Index: library/actiondlg.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/actiondlg.tcl,v retrieving revision 1.4 diff -u -r1.4 actiondlg.tcl --- library/actiondlg.tcl 29 Aug 2001 00:14:08 -0000 1.4 +++ library/actiondlg.tcl 15 Oct 2002 21:09:44 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class ActionDlg { +itcl::class ActionDlg { inherit ManagedWin # ------------------------------------------------------------------ Index: library/attachdlg.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/attachdlg.itb,v retrieving revision 1.4 diff -u -r1.4 attachdlg.itb --- library/attachdlg.itb 26 Oct 2000 18:31:38 -0000 1.4 +++ library/attachdlg.itb 15 Oct 2002 21:09:44 -0000 @@ -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::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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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] } Index: library/attachdlg.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/attachdlg.ith,v retrieving revision 1.2 diff -u -r1.2 attachdlg.ith --- library/attachdlg.ith 26 Oct 2000 18:31:38 -0000 1.2 +++ library/attachdlg.ith 15 Oct 2002 21:09:44 -0000 @@ -6,7 +6,7 @@ # ---------------------------------------------------------------------- # Copyright (C) 1999 Cygnus Solutions # -class AttachDlg { +itcl::class AttachDlg { inherit ModalDialog ManagedWin public { Index: library/blockframe.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/blockframe.itb,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 blockframe.itb --- library/blockframe.itb 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/blockframe.itb 15 Oct 2002 21:09:44 -0000 @@ -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 @@ } # 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 @@ # 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 @@ return $vars } -body Block::update {} { +itcl::body Block::update {} { set changed {} foreach var $_variables { @@ -69,7 +69,7 @@ return $changed } -body Block::info {} { +itcl::body Block::info {} { return [list $_start $_end] } @@ -77,7 +77,7 @@ # ------------------------------------------------------------------ # Frame # ------------------------------------------------------------------ -body Frame::constructor {addr} { +itcl::body Frame::constructor {addr} { set _addr $addr @@ -87,14 +87,14 @@ } -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::_addBlock {block} { +itcl::body Frame::_addBlock {block} { set start [lindex $block 0] set end [lindex $block 1] @@ -113,14 +113,14 @@ 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 @@ return $vars } -body Frame::variables {} { +itcl::body Frame::variables {} { set vars {} foreach block $_blocks { @@ -140,7 +140,7 @@ 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 @@ 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 @@ 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 @@ return $vars } -body Frame::_findBlock {block} { +itcl::body Frame::_findBlock {block} { foreach b $_blocks { set info [$b info] @@ -210,7 +210,7 @@ return "" } -body Frame::_findBlockIndex {block} { +itcl::body Frame::_findBlockIndex {block} { set i 0 foreach b $_blocks { Index: library/blockframe.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/blockframe.ith,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 blockframe.ith --- library/blockframe.ith 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/blockframe.ith 15 Oct 2002 21:09:44 -0000 @@ -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 Frame { +itcl::class Frame { public { method constructor {addr} Index: library/bpwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/bpwin.itb,v retrieving revision 1.14 diff -u -r1.14 bpwin.itb --- library/bpwin.itb 7 Jun 2002 09:22:44 -0000 1.14 +++ library/bpwin.itb 15 Oct 2002 21:09:44 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # METHOD: bp_remove - remove a breakpoint # ------------------------------------------------------------------ -body BpWin::bp_remove { i } { +itcl::body BpWin::bp_remove { i } { bp_select $i @@ -561,7 +561,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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] Index: library/bpwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/bpwin.ith,v retrieving revision 1.3 diff -u -r1.3 bpwin.ith --- library/bpwin.ith 21 Dec 2001 21:36:21 -0000 1.3 +++ library/bpwin.ith 15 Oct 2002 21:09:44 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class BpWin { +itcl::class BpWin { inherit EmbeddedWin GDBWin public { Index: library/browserwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/browserwin.itb,v retrieving revision 1.6 diff -u -r1.6 browserwin.itb --- library/browserwin.itb 1 Aug 2002 01:19:02 -0000 1.6 +++ library/browserwin.itb 15 Oct 2002 21:09:44 -0000 @@ -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 @@ # ------------------------------------------------------------------ # DESTRUCTOR - destroy window containing widget # ------------------------------------------------------------------ -body BrowserWin::destructor {} { +itcl::body BrowserWin::destructor {} { if {$resize_after != ""} { after cancel $resize_after @@ -65,7 +65,7 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 != ""} { Index: library/browserwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/browserwin.ith,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 browserwin.ith --- library/browserwin.ith 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/browserwin.ith 15 Oct 2002 21:09:44 -0000 @@ -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 { Index: library/console.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/console.itb,v retrieving revision 1.22 diff -u -r1.22 console.itb --- library/console.itb 19 Sep 2002 02:35:06 -0000 1.22 +++ library/console.itb 15 Oct 2002 21:09:45 -0000 @@ -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 @@ 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::idle {event} { +itcl::body Console::idle {event} { set _running 0 $_top configure -cursor {} } @@ -210,7 +210,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # METHOD: _last - get the last history element # ------------------------------------------------------------------ -body Console::_last {} { +itcl::body Console::_last {} { set _histElement 0 _next } @@ -358,7 +358,7 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ #------------------------------------------------------------------- # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 {} set _saw_tab 0 } @@ -651,7 +651,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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} { Index: library/console.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/console.ith,v retrieving revision 1.10 diff -u -r1.10 console.ith --- library/console.ith 18 Jan 2002 17:24:30 -0000 1.10 +++ library/console.ith 15 Oct 2002 21:09:45 -0000 @@ -17,7 +17,7 @@ # blocks. # ---------------------------------------------------------------------- -class Console { +itcl::class Console { inherit EmbeddedWin GDBEventHandler public { Index: library/data.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/data.itb,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 data.itb --- library/data.itb 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/data.itb 15 Oct 2002 21:09:45 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 Index: library/data.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/data.ith,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 data.ith --- library/data.ith 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/data.ith 15 Oct 2002 21:09:45 -0000 @@ -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 @@ } # Generic Queue -class Queue { +itcl::class Queue { inherit Stack public { Index: library/debugwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/debugwin.itb,v retrieving revision 1.8 diff -u -r1.8 debugwin.itb --- library/debugwin.itb 15 Jan 2002 19:52:01 -0000 1.8 +++ library/debugwin.itb 15 Oct 2002 21:09:45 -0000 @@ -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 @@ # # ARGS: None # ----------------------------------------------------------------------------- -body DebugWin::destructor {} { +itcl::body DebugWin::destructor {} { # notify debug code that window is going away ::debug::debugwin "" } @@ -51,7 +51,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # # 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 @@ # # 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 @@ # # 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 @@ # # 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 @@ # # 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 @@ # # DESC: Destroys the Debug Window Options Dialog. # ----------------------------------------------------------------------------- -body DebugWinDOpts::destructor {} { +itcl::body DebugWinDOpts::destructor {} { } @@ -334,7 +334,7 @@ # 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 @@ # 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 @@ # 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 != ""} { Index: library/debugwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/debugwin.ith,v retrieving revision 1.3 diff -u -r1.3 debugwin.ith --- library/debugwin.ith 24 Apr 2002 17:11:19 -0000 1.3 +++ library/debugwin.ith 15 Oct 2002 21:09:45 -0000 @@ -25,7 +25,7 @@ # This window is for developers. # # ----------------------------------------------------------------------------- -class DebugWin { +itcl::class DebugWin { inherit ManagedWin private { @@ -71,7 +71,7 @@ # This window is for developers. # # ----------------------------------------------------------------------------- -class DebugWinDOpts { +itcl::class DebugWinDOpts { inherit ManagedWin public { Index: library/download.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/download.itb,v retrieving revision 1.8 diff -u -r1.8 download.itb --- library/download.itb 1 Aug 2002 01:19:02 -0000 1.8 +++ library/download.itb 15 Oct 2002 21:09:45 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ } # 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 Index: library/download.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/download.ith,v retrieving revision 1.4 diff -u -r1.4 download.ith --- library/download.ith 24 Apr 2002 17:11:19 -0000 1.4 +++ library/download.ith 15 Oct 2002 21:09:45 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class Download { +itcl::class Download { inherit ManagedWin protected { Index: library/ehandler.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/ehandler.itb,v retrieving revision 1.1 diff -u -r1.1 ehandler.itb --- library/ehandler.itb 19 Apr 2001 22:48:47 -0000 1.1 +++ library/ehandler.itb 15 Oct 2002 21:09:45 -0000 @@ -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] Index: library/ehandler.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/ehandler.ith,v retrieving revision 1.6 diff -u -r1.6 ehandler.ith --- library/ehandler.ith 13 Aug 2001 18:30:36 -0000 1.6 +++ library/ehandler.ith 15 Oct 2002 21:09:45 -0000 @@ -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 {} Index: library/embeddedwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/embeddedwin.ith,v retrieving revision 1.2 diff -u -r1.2 embeddedwin.ith --- library/embeddedwin.ith 8 Feb 2001 19:26:31 -0000 1.2 +++ library/embeddedwin.ith 15 Oct 2002 21:09:45 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class EmbeddedWin { +itcl::class EmbeddedWin { inherit ManagedWin constructor {args} { Index: library/gdbevent.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/gdbevent.itb,v retrieving revision 1.4 diff -u -r1.4 gdbevent.itb --- library/gdbevent.itb 11 Jun 2001 23:08:05 -0000 1.4 +++ library/gdbevent.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # ------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # PUBLIC METHOD: get - Retrieve data about the event # ------------------------------------------------------------ -body UpdateEvent::get {what} { +itcl::body UpdateEvent::get {what} { switch $what { compile_filename { return $_compile_filename } Index: library/gdbevent.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/gdbevent.ith,v retrieving revision 1.7 diff -u -r1.7 gdbevent.ith --- library/gdbevent.ith 13 Aug 2001 18:30:36 -0000 1.7 +++ library/gdbevent.ith 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # 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 @@ # 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 @@ # # 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 @@ # 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 @@ # "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 @@ # # 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 @@ # # This event is posted whenever the target architecture changes -class ArchChangedEvent { +itcl::class ArchChangedEvent { inherit GDBEvent public method handler {} { return "arch_changed" } Index: library/gdbmenubar.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/gdbmenubar.itcl,v retrieving revision 1.9 diff -u -r1.9 gdbmenubar.itcl --- library/gdbmenubar.itcl 13 Jun 2002 00:06:44 -0000 1.9 +++ library/gdbmenubar.itcl 15 Oct 2002 21:09:46 -0000 @@ -28,7 +28,7 @@ # # ---------------------------------------------------------------------- -class GDBMenuBar { +itcl::class GDBMenuBar { inherit itk::Widget # ------------------------------------------------------------------ Index: library/gdbtoolbar.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/gdbtoolbar.itcl,v retrieving revision 1.5 diff -u -r1.5 gdbtoolbar.itcl --- library/gdbtoolbar.itcl 11 Oct 2001 06:14:05 -0000 1.5 +++ library/gdbtoolbar.itcl 15 Oct 2002 21:09:46 -0000 @@ -28,7 +28,7 @@ # # ---------------------------------------------------------------------- -class GDBToolBar { +itcl::class GDBToolBar { inherit itk::Widget # ------------------------------------------------------------------ Index: library/gdbwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/gdbwin.ith,v retrieving revision 1.3 diff -u -r1.3 gdbwin.ith --- library/gdbwin.ith 19 Apr 2001 22:55:26 -0000 1.3 +++ library/gdbwin.ith 15 Oct 2002 21:09:46 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class GDBWin { +itcl::class GDBWin { inherit GDBEventHandler constructor {args} { Index: library/globalpref.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/globalpref.itb,v retrieving revision 1.8 diff -u -r1.8 globalpref.itb --- library/globalpref.itb 7 Jun 2002 09:22:44 -0000 1.8 +++ library/globalpref.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # # 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::_toggle_tracing {win} { +itcl::body GlobalPref::_toggle_tracing {win} { debug $win configure -text $tracing_labels($_new(gdb/mode)) } @@ -364,14 +364,14 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 Index: library/globalpref.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/globalpref.ith,v retrieving revision 1.3 diff -u -r1.3 globalpref.ith --- library/globalpref.ith 5 Nov 2001 19:00:30 -0000 1.3 +++ library/globalpref.ith 15 Oct 2002 21:09:46 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class GlobalPref { +itcl::class GlobalPref { inherit ManagedWin ModalDialog private { Index: library/helpviewer.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/helpviewer.itb,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 helpviewer.itb --- library/helpviewer.itb 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/helpviewer.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # "fore", and "home" # # ------------------------------------------------------------------------------ -body HtmlViewer::_enable { on args } { +itcl::body HtmlViewer::_enable { on args } { if {$on} { set state normal } else { @@ -216,7 +216,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 Index: library/helpviewer.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/helpviewer.ith,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 helpviewer.ith --- library/helpviewer.ith 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/helpviewer.ith 15 Oct 2002 21:09:46 -0000 @@ -25,7 +25,7 @@ # Currently used as a help window. # # ----------------------------------------------------------------------------- -class HtmlViewer { +itcl::class HtmlViewer { inherit EmbeddedWin public { @@ -80,7 +80,7 @@ # Currently used by the HtmlViewer class. # # ----------------------------------------------------------------------------- -class PageStack { +itcl::class PageStack { private { variable _ptr -1 variable _max -1 Index: library/kod.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/kod.itb,v retrieving revision 1.6 diff -u -r1.6 kod.itb --- library/kod.itb 4 Jun 2001 15:49:53 -0000 1.6 +++ library/kod.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # METHOD: update - update widget when something changes # ------------------------------------------------------------------ -body KodWin::update {event} { +itcl::body KodWin::update {event} { debug "updating kod window" @@ -168,7 +168,7 @@ # We get here from a press on the Display button or # from a 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # - 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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) Index: library/kod.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/kod.ith,v retrieving revision 1.5 diff -u -r1.5 kod.ith --- library/kod.ith 4 Jun 2001 15:49:53 -0000 1.5 +++ library/kod.ith 15 Oct 2002 21:09:46 -0000 @@ -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 { Index: library/locals.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/locals.tcl,v retrieving revision 1.3 diff -u -r1.3 locals.tcl --- library/locals.tcl 4 Jun 2001 15:49:53 -0000 1.3 +++ library/locals.tcl 15 Oct 2002 21:09:46 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class LocalsWin { +itcl::class LocalsWin { inherit VariableWin # ------------------------------------------------------------------ Index: library/managedwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v retrieving revision 1.25 diff -u -r1.25 managedwin.itb --- library/managedwin.itb 24 Apr 2002 17:11:19 -0000 1.25 +++ library/managedwin.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # ------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # PRIVATE PROC: _open # ------------------------------------------------------------ -body ManagedWin::_open { class args } { +itcl::body ManagedWin::_open { class args } { debug "$class $args" parse_args force @@ -202,7 +202,7 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # PUBLIC PROC: init # ------------------------------------------------------------ -body ManagedWin::init {} { +itcl::body ManagedWin::init {} { wm withdraw . set _screenheight [winfo screenheight .] set _screenwidth [winfo screenwidth .] @@ -350,14 +350,14 @@ # ------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------ # PROTECTED METHOD: _thaw_me # ------------------------------------------------------------ -body ManagedWin::_thaw_me {} { +itcl::body ManagedWin::_thaw_me {} { $_top configure -cursor {} ::update idletasks @@ -375,7 +375,7 @@ # 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 \ Index: library/managedwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.ith,v retrieving revision 1.6 diff -u -r1.6 managedwin.ith --- library/managedwin.ith 24 Apr 2002 17:11:19 -0000 1.6 +++ library/managedwin.ith 15 Oct 2002 21:09:46 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class ManagedWin { +itcl::class ManagedWin { inherit itk::Widget public { Index: library/mempref.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/mempref.itb,v retrieving revision 1.3 diff -u -r1.3 mempref.itb --- library/mempref.itb 5 Mar 2002 22:22:19 -0000 1.3 +++ library/mempref.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # METHOD: ok - apply and quit # ------------------------------------------------------------------ -body MemPref::ok {} { +itcl::body MemPref::ok {} { apply unpost } @@ -241,14 +241,14 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # METHOD: apply - apply changes to the parent window # ------------------------------------------------------------------ -body MemPref::apply {} { +itcl::body MemPref::apply {} { busy gdbtk_busy @@ -336,7 +336,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 Index: library/mempref.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/mempref.ith,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 mempref.ith --- library/mempref.ith 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/mempref.ith 15 Oct 2002 21:09:46 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class MemPref { +itcl::class MemPref { inherit ModalDialog ManagedWin public { Index: library/memwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/memwin.itb,v retrieving revision 1.20 diff -u -r1.20 memwin.itb --- library/memwin.itb 20 Sep 2002 06:03:19 -0000 1.20 +++ library/memwin.itb 15 Oct 2002 21:09:46 -0000 @@ -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 @@ # ------------------------------------------------------------------ # METHOD: destructor - destroy the dialog # ------------------------------------------------------------------ -body MemWin::destructor {} { +itcl::body MemWin::destructor {} { if {[winfo exists $prefs_win]} { $prefs_win cancel } @@ -62,7 +62,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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::_update_address {make_busy} { +itcl::body MemWin::_update_address {make_busy} { if {$make_busy} { gdbtk_busy } @@ -461,7 +461,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # METHOD: hidemb - hide the menubar. NOT CURRENTLY USED # ------------------------------------------------------------------ -body MemWin::hidemb {} { +itcl::body MemWin::hidemb {} { set mbar 0 reconfig } @@ -610,7 +610,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 Index: library/memwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/memwin.ith,v retrieving revision 1.8 diff -u -r1.8 memwin.ith --- library/memwin.ith 6 Mar 2002 23:56:03 -0000 1.8 +++ library/memwin.ith 15 Oct 2002 21:09:47 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class MemWin { +itcl::class MemWin { inherit EmbeddedWin GDBWin private { Index: library/modal.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/modal.tcl,v retrieving revision 1.2 diff -u -r1.2 modal.tcl --- library/modal.tcl 4 Jan 2001 17:55:48 -0000 1.2 +++ library/modal.tcl 15 Oct 2002 21:09:47 -0000 @@ -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. Index: library/pluginwin.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/pluginwin.itcl,v retrieving revision 1.5 diff -u -r1.5 pluginwin.itcl --- library/pluginwin.itcl 24 Apr 2002 17:11:19 -0000 1.5 +++ library/pluginwin.itcl 15 Oct 2002 21:09:47 -0000 @@ -28,7 +28,7 @@ # # ---------------------------------------------------------------------- -class PluginWindow { +itcl::class PluginWindow { inherit ManagedWin GDBEventHandler # ------------------------------------------------------------------ Index: library/process.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/process.itb,v retrieving revision 1.9 diff -u -r1.9 process.itb --- library/process.itb 7 Jun 2002 09:22:44 -0000 1.9 +++ library/process.itb 15 Oct 2002 21:09:47 -0000 @@ -18,7 +18,7 @@ # # ---------------------------------------------------------------------- -body ProcessWin::constructor {args} { +itcl::body ProcessWin::constructor {args} { window_name "Processes" gdbtk_busy @@ -33,7 +33,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # - 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 @@ # ------------------------------------------------------------------ # METHOD: idle - handle IdleEvent # ------------------------------------------------------------------ -body ProcessWin::idle {event} { +itcl::body ProcessWin::idle {event} { set Running 0 cursor {} } @@ -168,6 +168,6 @@ # 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 } Index: library/process.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/process.ith,v retrieving revision 1.6 diff -u -r1.6 process.ith --- library/process.ith 29 Aug 2001 15:26:38 -0000 1.6 +++ library/process.ith 15 Oct 2002 21:09:47 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class ProcessWin { +itcl::class ProcessWin { inherit EmbeddedWin GDBWin private { Index: library/regwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v retrieving revision 1.17 diff -u -r1.17 regwin.itb --- library/regwin.itb 7 Jun 2002 09:22:44 -0000 1.17 +++ library/regwin.itb 15 Oct 2002 21:09:47 -0000 @@ -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 @@ # ARGUMENTS: None # RETURNS: Nothing # ------------------------------------------------------------------ -body RegWin::destructor {} { +itcl::body RegWin::destructor {} { debug } @@ -72,7 +72,7 @@ # ARGUMENTS: None # RETURNS: Nothing # ------------------------------------------------------------------ -body RegWin::_load_prefs {} { +itcl::body RegWin::_load_prefs {} { debug # Find out largest register name length. @@ -155,7 +155,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # # 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 @@ # NOTES: Event handler for and # 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 @@ # # 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 @@ # # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # # 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 @@ # # NOTES: # ------------------------------------------------------------------ -body RegWin::_change_format {rn {newtype {}}} { +itcl::body RegWin::_change_format {rn {newtype {}}} { set name [gdb_reginfo name $rn] @@ -1019,7 +1019,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # ARGUMENTS: event - the UpdateEvent (not used) # RETURNS: Nothing # ------------------------------------------------------------------ -body RegWin::update {event} { +itcl::body RegWin::update {event} { dbug I "START REGISTER UPDATE CALLBACK" Index: library/regwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.ith,v retrieving revision 1.9 diff -u -r1.9 regwin.ith --- library/regwin.ith 16 May 2002 01:09:37 -0000 1.9 +++ library/regwin.ith 15 Oct 2002 21:09:47 -0000 @@ -15,7 +15,7 @@ # GNU General Public License for more details. -class RegWin { +itcl::class RegWin { inherit EmbeddedWin GDBWin private { Index: library/srcbar.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.itcl,v retrieving revision 1.19 diff -u -r1.19 srcbar.itcl --- library/srcbar.itcl 14 Aug 2002 18:10:49 -0000 1.19 +++ library/srcbar.itcl 15 Oct 2002 21:09:47 -0000 @@ -28,7 +28,7 @@ # # ---------------------------------------------------------------------- -class SrcBar { +itcl::class SrcBar { inherit itk::Widget GDBEventHandler # ------------------------------------------------------------------ Index: library/srcpref.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcpref.itb,v retrieving revision 1.6 diff -u -r1.6 srcpref.itb --- library/srcpref.itb 7 Jun 2002 09:22:44 -0000 1.6 +++ library/srcpref.itb 15 Oct 2002 21:09:47 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ 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 @@ # ------------------------------------------------------------------ # METHOD: save - apply changes and quit # ------------------------------------------------------------------ -body SrcPref::_save {} { +itcl::body SrcPref::_save {} { _apply unpost } @@ -258,7 +258,7 @@ # 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 @@ # ------------------------------------------------------------------ # 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 Index: library/srcpref.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcpref.ith,v retrieving revision 1.2 diff -u -r1.2 srcpref.ith --- library/srcpref.ith 18 Oct 2001 17:57:50 -0000 1.2 +++ library/srcpref.ith 15 Oct 2002 21:09:47 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class SrcPref { +itcl::class SrcPref { inherit ManagedWin ModalDialog private { Index: library/srctextwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v retrieving revision 1.37 diff -u -r1.37 srctextwin.itb --- library/srctextwin.itb 24 Sep 2002 22:24:20 -0000 1.37 +++ library/srctextwin.itb 15 Oct 2002 21:09:48 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ $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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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::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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # uses current(filename) in SOURCE mode # ------------------------------------------------------------------ -body SrcTextWin::display_breaks {} { +itcl::body SrcTextWin::display_breaks {} { # debug # clear any previous breakpoints @@ -1355,7 +1355,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # # 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 @@ # # 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 @@ # # 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 @@ # ------------------------------------------------------------------ # 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 @@ # # 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 @@ # # 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 @@ # 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 @@ # # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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::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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # METHOD: get_file - Return name of current file. # ------------------------------------------------------------------ -body SrcTextWin::get_file {} { +itcl::body SrcTextWin::get_file {} { return $current(filename) } @@ -2893,7 +2893,7 @@ # 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::_initialize_srctextwin {} { +itcl::body SrcTextWin::_initialize_srctextwin {} { set pc(filename) "" set pc(func) "" set pc(line) 0 @@ -2940,7 +2940,7 @@ # ------------------------------------------------------------------ # 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) Index: library/srctextwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.ith,v retrieving revision 1.12 diff -u -r1.12 srctextwin.ith --- library/srctextwin.ith 20 Apr 2001 18:47:33 -0000 1.12 +++ library/srctextwin.ith 15 Oct 2002 21:09:48 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class SrcTextWin { +itcl::class SrcTextWin { inherit itk::Widget GDBWin public { Index: library/srcwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v retrieving revision 1.26 diff -u -r1.26 srcwin.itb --- library/srcwin.itb 6 Aug 2002 19:35:33 -0000 1.26 +++ library/srcwin.itb 15 Oct 2002 21:09:48 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # PUBLIC METHOD: reconfig - used when preferences change # ------------------------------------------------------------------ -body SrcWin::reconfig {} { +itcl::body SrcWin::reconfig {} { debug $_toolbar reconfig $twin reconfig @@ -290,7 +290,7 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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::_exit {} { +itcl::body SrcWin::_exit {} { debug if {[llength [ManagedWin::find SrcWin]] == 1} { if {![gdbtk_quit_check]} { @@ -828,7 +828,7 @@ } # 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 @@ # 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 @@ # # 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 @@ # - 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 @@ # 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 @@ # 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 @@ # METHOD: get_top # Return toplevel # ------------------------------------------------------------------ -body SrcWin::get_top {} { +itcl::body SrcWin::get_top {} { return $top } @@ -945,7 +945,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 Index: library/srcwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.ith,v retrieving revision 1.10 diff -u -r1.10 srcwin.ith --- library/srcwin.ith 26 Feb 2002 00:29:06 -0000 1.10 +++ library/srcwin.ith 15 Oct 2002 21:09:48 -0000 @@ -23,7 +23,7 @@ # should be returned and SrcWin should figure out what to do. # ---------------------------------------------------------------------- -class SrcWin { +itcl::class SrcWin { inherit TopLevelWin GDBWin public { Index: library/stackwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/stackwin.itb,v retrieving revision 1.8 diff -u -r1.8 stackwin.itb --- library/stackwin.itb 7 Jun 2002 09:22:44 -0000 1.8 +++ library/stackwin.itb 15 Oct 2002 21:09:48 -0000 @@ -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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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::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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 } Index: library/stackwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/stackwin.ith,v retrieving revision 1.5 diff -u -r1.5 stackwin.ith --- library/stackwin.ith 20 Aug 2001 19:14:09 -0000 1.5 +++ library/stackwin.ith 15 Oct 2002 21:09:48 -0000 @@ -16,7 +16,7 @@ # Implements stack window for gdb # ---------------------------------------------------------------------- -class StackWin { +itcl::class StackWin { inherit EmbeddedWin GDBWin private { Index: library/targetselection.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.itb,v retrieving revision 1.11 diff -u -r1.11 targetselection.itb --- library/targetselection.itb 10 Oct 2002 00:46:39 -0000 1.11 +++ library/targetselection.itb 15 Oct 2002 21:09:48 -0000 @@ -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::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 @@ 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::_init_prefs {} { +itcl::body TargetSelection::_init_prefs {} { if {$prefs_inited} { return @@ -325,7 +325,7 @@ 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 {} { +itcl::body TargetSelection::_init {} { if {!$trace_inited} { # Trace all gdb_loaded changes based on target @@ -385,7 +385,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # ------------------------------------------------------------------ # METHOD: save - save values # ------------------------------------------------------------------ -body TargetSelection::save {} { +itcl::body TargetSelection::save {} { global gdb_target_name set err [catch { set_saved @@ -941,7 +941,7 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # ------------------------------------------------------------------ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ } # 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 @@ } # 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)] Index: library/targetselection.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.ith,v retrieving revision 1.3 diff -u -r1.3 targetselection.ith --- library/targetselection.ith 31 Oct 2000 20:21:48 -0000 1.3 +++ library/targetselection.ith 15 Oct 2002 21:09:48 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class TargetSelection { +itcl::class TargetSelection { inherit ModalDialog ManagedWin private { Index: library/tclIndex =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/tclIndex,v retrieving revision 1.22 diff -u -r1.22 tclIndex --- library/tclIndex 18 Feb 2002 17:19:44 -0000 1.22 +++ library/tclIndex 15 Oct 2002 21:09:48 -0000 @@ -8,6 +8,7 @@ set auto_index(About) [list source [file join $dir about.tcl]] set auto_index(ActionDlg) [list source [file join $dir actiondlg.tcl]] +set auto_index(::Editor::edit) [list source [file join $dir editor.tcl]] set auto_index(gdbtk_tcl_set_variable) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_preloop) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_busy) [list source [file join $dir interface.tcl]] @@ -16,6 +17,7 @@ set auto_index(gdbtk_idle) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_quit_check) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_quit) [list source [file join $dir interface.tcl]] +set auto_index(gdbtk_force_quit) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_cleanup) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_query) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_warning) [list source [file join $dir interface.tcl]] @@ -33,6 +35,7 @@ set auto_index(gdbtk_tcl_tracepoint) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_trace_find_hook) [list source [file join $dir interface.tcl]] set auto_index(gdb_run_readline_command) [list source [file join $dir interface.tcl]] +set auto_index(gdb_run_readline_command_no_output) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_readline_begin) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_readline) [list source [file join $dir interface.tcl]] set auto_index(gdbtk_tcl_readline_end) [list source [file join $dir interface.tcl]] @@ -82,17 +85,21 @@ set auto_index(gdbtk_tcl_architecture_changed) [list source [file join $dir interface.tcl]] set auto_index(LocalsWin) [list source [file join $dir locals.tcl]] set auto_index(ModalDialog) [list source [file join $dir modal.tcl]] +set auto_index(NewWatchWin) [list source [file join $dir newwatch.tcl]] set auto_index(pref_read) [list source [file join $dir prefs.tcl]] set auto_index(pref_save) [list source [file join $dir prefs.tcl]] set auto_index(escape_value) [list source [file join $dir prefs.tcl]] set auto_index(unescape_value) [list source [file join $dir prefs.tcl]] set auto_index(pref_set_defaults) [list source [file join $dir prefs.tcl]] -set auto_index(pref_src-font_trace) [list source [file join $dir prefs.tcl]] -set auto_index(Session::save) [list source [file join $dir session.tcl]] -set auto_index(Session::load) [list source [file join $dir session.tcl]] -set auto_index(Session::delete) [list source [file join $dir session.tcl]] -set auto_index(Session::list_names) [list source [file join $dir session.tcl]] -set auto_index(Session::notice_file_change) [list source [file join $dir session.tcl]] +set auto_index(pref_set_colors) [list source [file join $dir prefs.tcl]] +set auto_index(::Session::_exe_name) [list source [file join $dir session.tcl]] +set auto_index(::Session::_serialize_bps) [list source [file join $dir session.tcl]] +set auto_index(::Session::_recreate_bps) [list source [file join $dir session.tcl]] +set auto_index(::Session::save) [list source [file join $dir session.tcl]] +set auto_index(::Session::load) [list source [file join $dir session.tcl]] +set auto_index(::Session::notice_file_change) [list source [file join $dir session.tcl]] +set auto_index(::Session::delete) [list source [file join $dir session.tcl]] +set auto_index(::Session::list_names) [list source [file join $dir session.tcl]] set auto_index(TdumpWin) [list source [file join $dir tdump.tcl]] set auto_index(TfindArgs) [list source [file join $dir tfind_args.tcl]] set auto_index(oldGDBToolBar) [list source [file join $dir toolbar.tcl]] @@ -112,13 +119,15 @@ set auto_index(bp_exists) [list source [file join $dir util.tcl]] set auto_index(CygScrolledListbox) [list source [file join $dir util.tcl]] set auto_index(gridCGet) [list source [file join $dir util.tcl]] -set auto_index(find_iwidgets_library) [list source [file join $dir util.tcl]] set auto_index(get_disassembly_flavor) [list source [file join $dir util.tcl]] set auto_index(list_disassembly_flavors) [list source [file join $dir util.tcl]] set auto_index(init_disassembly_flavor) [list source [file join $dir util.tcl]] set auto_index(list_element_strcmp) [list source [file join $dir util.tcl]] +set auto_index(gdbtk_endian) [list source [file join $dir util.tcl]] set auto_index(VariableWin) [list source [file join $dir variables.tcl]] set auto_index(::VariableWin::getLocals) [list source [file join $dir variables.tcl]] +set auto_index(GdbVar) [list source [file join $dir vartree.tcl]] +set auto_index(VarTree) [list source [file join $dir vartree.tcl]] set auto_index(WarningDlg) [list source [file join $dir warning.tcl]] set auto_index(::WarningDlg::constructor) [list source [file join $dir warning.tcl]] set auto_index(WatchWin) [list source [file join $dir watch.tcl]] @@ -165,6 +174,7 @@ set auto_index(StackWin) [list source [file join $dir stackwin.ith]] set auto_index(TargetSelection) [list source [file join $dir targetselection.ith]] set auto_index(TopLevelWin) [list source [file join $dir toplevelwin.ith]] +set auto_index(NewVariableWin) [list source [file join $dir variables.ith]] set auto_index(::AttachDlg::constructor) [list source [file join $dir attachdlg.itb]] set auto_index(::AttachDlg::build_win) [list source [file join $dir attachdlg.itb]] set auto_index(::AttachDlg::doit) [list source [file join $dir attachdlg.itb]] @@ -200,6 +210,7 @@ set auto_index(::BpWin::bp_store) [list source [file join $dir bpwin.itb]] set auto_index(::BpWin::bp_restore) [list source [file join $dir bpwin.itb]] set auto_index(::BpWin::bp_select) [list source [file join $dir bpwin.itb]] +set auto_index(::BpWin::_select_and_popup) [list source [file join $dir bpwin.itb]] set auto_index(::BpWin::bp_modify) [list source [file join $dir bpwin.itb]] set auto_index(::BpWin::bp_able) [list source [file join $dir bpwin.itb]] set auto_index(::BpWin::bp_remove) [list source [file join $dir bpwin.itb]] @@ -241,7 +252,7 @@ set auto_index(::Console::idle) [list source [file join $dir console.itb]] set auto_index(::Console::busy) [list source [file join $dir console.itb]] set auto_index(::Console::insert) [list source [file join $dir console.itb]] -set auto_index(::Console::einsert) [list source [file join $dir console.itb]] +set auto_index(::Console::_operate_and_get_next) [list source [file join $dir console.itb]] set auto_index(::Console::_previous) [list source [file join $dir console.itb]] set auto_index(::Console::_search_history) [list source [file join $dir console.itb]] set auto_index(::Console::_rsearch_history) [list source [file join $dir console.itb]] @@ -254,13 +265,13 @@ set auto_index(::Console::_delete) [list source [file join $dir console.itb]] set auto_index(::Console::_insertion) [list source [file join $dir console.itb]] set auto_index(::Console::_paste) [list source [file join $dir console.itb]] -set auto_index(::Console::get_text) [list source [file join $dir console.itb]] set auto_index(::Console::_find_lcp) [list source [file join $dir console.itb]] set auto_index(::Console::_find_completion) [list source [file join $dir console.itb]] set auto_index(::Console::_complete) [list source [file join $dir console.itb]] set auto_index(::Console::_reset_tab) [list source [file join $dir console.itb]] set auto_index(::Console::_set_wrap) [list source [file join $dir console.itb]] set auto_index(::Console::_update_option) [list source [file join $dir console.itb]] +set auto_index(::Console::test) [list source [file join $dir console.itb]] set auto_index(::Stack::constructor) [list source [file join $dir data.itb]] set auto_index(::Stack::push) [list source [file join $dir data.itb]] set auto_index(::Stack::destructor) [list source [file join $dir data.itb]] @@ -303,18 +314,19 @@ set auto_index(::UpdateEvent::constructor) [list source [file join $dir gdbevent.itb]] set auto_index(::UpdateEvent::get) [list source [file join $dir gdbevent.itb]] set auto_index(::GlobalPref::_init) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_init_var) [list source [file join $dir globalpref.itb]] set auto_index(::GlobalPref::constructor) [list source [file join $dir globalpref.itb]] set auto_index(::GlobalPref::destructor) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::build_win) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::make_font_item) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::resize_font_item_height) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::change_icons) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_build_win) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_make_font_item) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_resize_font_item_height) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_change_icons) [list source [file join $dir globalpref.itb]] set auto_index(::GlobalPref::_change_font) [list source [file join $dir globalpref.itb]] set auto_index(::GlobalPref::_change_size) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::toggle_tracing_mode) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::toggle_tracing) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::ok) [list source [file join $dir globalpref.itb]] -set auto_index(::GlobalPref::apply) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_toggle_tracing) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_ok) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_apply) [list source [file join $dir globalpref.itb]] +set auto_index(::GlobalPref::_cancel) [list source [file join $dir globalpref.itb]] set auto_index(::GlobalPref::cancel) [list source [file join $dir globalpref.itb]] set auto_index(::HtmlViewer::constructor) [list source [file join $dir helpviewer.itb]] set auto_index(::HtmlViewer::_buildwin) [list source [file join $dir helpviewer.itb]] @@ -393,6 +405,7 @@ set auto_index(::MemWin::idle) [list source [file join $dir memwin.itb]] set auto_index(::MemWin::busy) [list source [file join $dir memwin.itb]] set auto_index(::MemWin::newsize) [list source [file join $dir memwin.itb]] +set auto_index(::MemWin::_update_address) [list source [file join $dir memwin.itb]] set auto_index(::MemWin::update_address_cb) [list source [file join $dir memwin.itb]] set auto_index(::MemWin::update_address) [list source [file join $dir memwin.itb]] set auto_index(::MemWin::BadExpr) [list source [file join $dir memwin.itb]] @@ -417,22 +430,21 @@ set auto_index(::ProcessWin::cursor) [list source [file join $dir process.itb]] set auto_index(::RegWin::constructor) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::destructor) [list source [file join $dir regwin.itb]] +set auto_index(::RegWin::_load_prefs) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_build_win) [list source [file join $dir regwin.itb]] -set auto_index(::RegWin::_dimensions) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_layout_table) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_size_cell_column) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_size_column) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_prefs_changed) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_accept_edit) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_add_to_watch) [list source [file join $dir regwin.itb]] +set auto_index(::RegWin::_open_memory) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_but3) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_delete_from_display) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_display_all) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_edit) [list source [file join $dir regwin.itb]] -set auto_index(::RegWin::_edit_menu) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_move) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_post_menu) [list source [file join $dir regwin.itb]] -set auto_index(::RegWin::_select) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_select_cell) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_unedit) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::_get_value) [list source [file join $dir regwin.itb]] @@ -444,11 +456,13 @@ set auto_index(::RegWin::set_variable) [list source [file join $dir regwin.itb]] set auto_index(::RegWin::update) [list source [file join $dir regwin.itb]] set auto_index(::SrcPref::constructor) [list source [file join $dir srcpref.itb]] -set auto_index(::SrcPref::build_win) [list source [file join $dir srcpref.itb]] +set auto_index(::SrcPref::_init_var) [list source [file join $dir srcpref.itb]] +set auto_index(::SrcPref::_build_win) [list source [file join $dir srcpref.itb]] set auto_index(::SrcPref::_apply) [list source [file join $dir srcpref.itb]] +set auto_index(::SrcPref::cancel) [list source [file join $dir srcpref.itb]] set auto_index(::SrcPref::_cancel) [list source [file join $dir srcpref.itb]] set auto_index(::SrcPref::_save) [list source [file join $dir srcpref.itb]] -set auto_index(::SrcPref::set_flavor) [list source [file join $dir srcpref.itb]] +set auto_index(::SrcPref::_set_flavor) [list source [file join $dir srcpref.itb]] set auto_index(::SrcPref::_pick) [list source [file join $dir srcpref.itb]] set auto_index(::SrcTextWin::constructor) [list source [file join $dir srctextwin.itb]] set auto_index(::SrcTextWin::destructor) [list source [file join $dir srctextwin.itb]] @@ -549,7 +563,7 @@ set auto_index(::SrcWin::enable_ui) [list source [file join $dir srcwin.itb]] set auto_index(::SrcWin::no_inferior) [list source [file join $dir srcwin.itb]] set auto_index(::SrcWin::reset) [list source [file join $dir srcwin.itb]] -set auto_index(::SrcWin::_search) [list source [file join $dir srcwin.itb]] +set auto_index(::SrcWin::search) [list source [file join $dir srcwin.itb]] set auto_index(::SrcWin::point_to_main) [list source [file join $dir srcwin.itb]] set auto_index(::SrcWin::_exit) [list source [file join $dir srcwin.itb]] set auto_index(::SrcWin::test_get) [list source [file join $dir srcwin.itb]] @@ -601,4 +615,39 @@ set auto_index(::TargetSelection::target_trace) [list source [file join $dir targetselection.itb]] set auto_index(::TargetSelection::valid_target) [list source [file join $dir targetselection.itb]] set auto_index(::TargetSelection::native_debugging) [list source [file join $dir targetselection.itb]] -set auto_index(::Editor::edit) [list source [file join $dir editor.tcl]] +set auto_index(::NewVariableWin::constructor) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::build_win) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::destructor) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::_clear_file) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::_reconfig) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::build_menu_helper) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::getSelection) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::selectionChanged) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::updateNow) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::getEntry) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::editEntry) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::postMenu) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::edit) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::getPrevious) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::UnEdit) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::changeValue) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::toggleView) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::toggleUpdate) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::setDisplay) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::label) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::open) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::close) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::isVariable) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::getVariablesBlankPath) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::cmd) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::add) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::getLocals) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::context_switch) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::update) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::idle) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::displayedVariables) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::deleteTree) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::enable_ui) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::busy) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::no_inferior) [list source [file join $dir variables.itb]] +set auto_index(::NewVariableWin::cursor) [list source [file join $dir variables.itb]] Index: library/tdump.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/tdump.tcl,v retrieving revision 1.6 diff -u -r1.6 tdump.tcl --- library/tdump.tcl 7 Jun 2002 09:22:44 -0000 1.6 +++ library/tdump.tcl 15 Oct 2002 21:09:48 -0000 @@ -28,7 +28,7 @@ # # ---------------------------------------------------------------------- -class TdumpWin { +itcl::class TdumpWin { inherit ManagedWin GDBWin # ------------------------------------------------------------------ Index: library/toolbar.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/toolbar.tcl,v retrieving revision 1.3 diff -u -r1.3 toolbar.tcl --- library/toolbar.tcl 3 Jan 2001 05:34:04 -0000 1.3 +++ library/toolbar.tcl 15 Oct 2002 21:09:48 -0000 @@ -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 # ------------------------------------------------------------------ Index: library/toplevelwin.ith =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/toplevelwin.ith,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 toplevelwin.ith --- library/toplevelwin.ith 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/toplevelwin.ith 15 Oct 2002 21:09:48 -0000 @@ -12,7 +12,7 @@ # GNU General Public License for more details. -class TopLevelWin { +itcl::class TopLevelWin { inherit ManagedWin private variable frame "" Index: library/tracedlg.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/tracedlg.tcl,v retrieving revision 1.6 diff -u -r1.6 tracedlg.tcl --- library/tracedlg.tcl 7 Jun 2002 09:22:44 -0000 1.6 +++ library/tracedlg.tcl 15 Oct 2002 21:09:48 -0000 @@ -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 # ------------------------------------------------------------------ Index: library/variables.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/variables.tcl,v retrieving revision 1.16 diff -u -r1.16 variables.tcl --- library/variables.tcl 7 Jun 2002 09:22:44 -0000 1.16 +++ library/variables.tcl 15 Oct 2002 21:09:49 -0000 @@ -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 @@ # 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. Index: library/warning.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/warning.tcl,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 warning.tcl --- library/warning.tcl 7 Feb 2000 00:19:42 -0000 1.1.1.1 +++ library/warning.tcl 15 Oct 2002 21:09:49 -0000 @@ -31,7 +31,7 @@ # ----------------------------------------------------------------------------- # -class WarningDlg { +itcl::class WarningDlg { inherit ManagedWin ModalDialog public { @@ -50,7 +50,7 @@ # DESC: # Creates the warning dialog. # ----------------------------------------------------------------------------- -body WarningDlg::constructor {args} { +itcl::body WarningDlg::constructor {args} { debug $args window_name "Warning" eval itk_initialize $args Index: library/watch.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/watch.tcl,v retrieving revision 1.5 diff -u -r1.5 watch.tcl --- library/watch.tcl 5 Mar 2002 22:22:20 -0000 1.5 +++ library/watch.tcl 15 Oct 2002 21:09:49 -0000 @@ -17,7 +17,7 @@ # class from variables.tcl. # ---------------------------------------------------------------------- -class WatchWin { +itcl::class WatchWin { inherit VariableWin # ------------------------------------------------------------------ --------------Boundary-00=_GHK1655UODPCRBH9IIGD--