This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] debug cleanup
- To: <insight at sources dot redhat dot com>
- Subject: [RFA] debug cleanup
- From: "Martin M. Hunt" <hunt at redhat dot com>
- Date: Tue, 6 Feb 2001 14:23:51 -0800 (PST)
Here's a cleanup patch to eliminate some of the junk in the debug window.
All debug functions print the functions name, so {debug "srcwin::start"}
would print "srcwin::start srcwin::start"
"debug" is just for informational/tracing use. Errors and warning should
use "dbug" so the debug window can display and filter accordingly.
The debug window is now called "Insight Debug" instead of GDBTK.
2001-02-06 Martin Hunt <hunt@redhat.com>
* library/debugwin.itb: Change window name to "Insight Debug"
* library/embeddedwin.ith: Fix debug messages.
* library/locals.tcl: Ditto.
* library/watch.tcl (postMenu): Ditto.
* library/variables.tcl: Ditto.
* library/regwin.itb: Ditto.
* library/gdbwin.ith: Ditto.
* library/srcbar.itcl: Ditto.
Index: debugwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/debugwin.itb,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 debugwin.itb
*** debugwin.itb 2000/02/07 00:19:42 1.1.1.1
--- debugwin.itb 2001/02/06 22:16:09
***************
*** 1,5 ****
# Debug window for GDBtk.
! # Copyright 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
# Debug window for GDBtk.
! # Copyright 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
***************
*** 23,29 ****
# -----------------------------------------------------------------------------
body DebugWin::constructor {args} {
debug ""
! window_name "GDBTK Debug" "Debug"
build_win
incr numTopWins
--- 23,29 ----
# -----------------------------------------------------------------------------
body DebugWin::constructor {args} {
debug ""
! window_name "Insight Debug" "Debug"
build_win
incr numTopWins
Index: embeddedwin.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/embeddedwin.ith,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 embeddedwin.ith
*** embeddedwin.ith 2000/02/07 00:19:42 1.1.1.1
--- embeddedwin.ith 2001/02/06 22:16:09
***************
*** 1,5 ****
# EmbeddedWin class definition for GDBtk.
! # Copyright 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
# EmbeddedWin class definition for GDBtk.
! # Copyright 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
*************** class EmbeddedWin {
*** 16,25 ****
inherit ManagedWin
constructor {args} {
! debug "EmbeddedWin::constructor $args"
}
destructor {
! debug "EmbeddedWin::destructor"
}
}
--- 16,25 ----
inherit ManagedWin
constructor {args} {
! debug "$args"
}
destructor {
! debug
}
}
Index: gdbwin.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/gdbwin.ith,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 gdbwin.ith
*** gdbwin.ith 2000/02/07 00:19:42 1.1.1.1
--- gdbwin.ith 2001/02/06 22:16:09
***************
*** 1,5 ****
! # GDBwin class definition for GDBtk.
! # Copyright 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
! # GDBwin class definition for Insight.
! # Copyright 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
*************** class GDBWin {
*** 17,26 ****
public method update
constructor {args} {
! debug "GDBWin::constructor $args"
}
destructor {
! debug "GDBWin::destructor"
}
}
--- 17,26 ----
public method update
constructor {args} {
! debug "$args"
}
destructor {
! debug
}
}
Index: interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.13
diff -p -r1.13 interface.tcl
*** interface.tcl 2001/01/04 16:36:48 1.13
--- interface.tcl 2001/02/06 22:16:13
*************** proc gdbtk_tcl_preloop { } {
*** 119,126 ****
proc gdbtk_busy {} {
set err [catch {run_hooks gdb_busy_hook} txt]
! if {$err} {
! debug "gdbtk_busy ERROR: $txt"
}
# Force the screen to update
--- 119,126 ----
proc gdbtk_busy {} {
set err [catch {run_hooks gdb_busy_hook} txt]
! if {$err} {
! dbug E "$txt"
}
# Force the screen to update
*************** proc gdbtk_busy {} {
*** 137,143 ****
proc gdbtk_update {} {
set err [catch {run_hooks gdb_update_hook} txt]
if {$err} {
! debug "gdbtk_update ERROR: $txt"
}
# Force the screen to update
--- 137,143 ----
proc gdbtk_update {} {
set err [catch {run_hooks gdb_update_hook} txt]
if {$err} {
! dbug E "$txt"
}
# Force the screen to update
*************** proc gdbtk_idle {} {
*** 184,196 ****
gdb_restore_fputs
set err [catch {run_hooks gdb_idle_hook} txt]
if {$err} {
! debug "gdbtk_idle 1 ERROR: $txt"
}
if {!$gdb_running} {
set err [catch {run_hooks gdb_no_inferior_hook} txt]
if {$err} {
! debug "gdbtk_idle 2 ERROR: $txt"
}
}
# Force the screen to update
--- 184,196 ----
gdb_restore_fputs
set err [catch {run_hooks gdb_idle_hook} txt]
if {$err} {
! dbug E "$txt"
}
if {!$gdb_running} {
set err [catch {run_hooks gdb_no_inferior_hook} txt]
if {$err} {
! dbug E "$txt"
}
}
# Force the screen to update
*************** proc gdbtk_tcl_tracepoint {action tpnum
*** 444,450 ****
# PROC: gdbtk_tcl_trace_find_hook -
# ------------------------------------------------------------------
proc gdbtk_tcl_trace_find_hook {arg from_tty} {
! # debug "Running trace find hook with $arg $from_tty"
run_hooks gdb_trace_find_hook $arg $from_tty
}
--- 444,450 ----
# PROC: gdbtk_tcl_trace_find_hook -
# ------------------------------------------------------------------
proc gdbtk_tcl_trace_find_hook {arg from_tty} {
! # debug "$arg $from_tty"
run_hooks gdb_trace_find_hook $arg $from_tty
}
*************** proc gdbtk_tcl_trace_find_hook {arg from
*** 463,469 ****
# ------------------------------------------------------------------
proc gdb_run_readline_command {command args} {
global gdbtk_state
! # debug "run readline_command $command $args"
set gdbtk_state(readlineArgs) $args
gdb_cmd $command
}
--- 463,469 ----
# ------------------------------------------------------------------
proc gdb_run_readline_command {command args} {
global gdbtk_state
! # debug "$command $args"
set gdbtk_state(readlineArgs) $args
gdb_cmd $command
}
*************** proc gdbtk_tcl_readline_begin {message}
*** 485,491 ****
# ------------------------------------------------------------------
proc gdbtk_tcl_readline {prompt} {
global gdbtk_state
! # debug "gdbtk_tcl_readline $prompt"
if {[info exists gdbtk_state(readlineArgs)]} {
# Not interactive, so pop the list, and print element.
set cmd [lvarpop gdbtk_state(readlineArgs)]
--- 485,491 ----
# ------------------------------------------------------------------
proc gdbtk_tcl_readline {prompt} {
global gdbtk_state
! # debug "$prompt"
if {[info exists gdbtk_state(readlineArgs)]} {
# Not interactive, so pop the list, and print element.
set cmd [lvarpop gdbtk_state(readlineArgs)]
*************** proc gdbtk_tcl_exec_file_display {filena
*** 719,725 ****
# ------------------------------------------------------------------
proc gdbtk_locate_main {} {
set main_names [pref get gdb/main_names]
! debug "gdbtk_locate_main: Searching $main_names"
foreach main $main_names {
if {![catch {gdb_search functions $main -static 1}] \
&& ![catch {gdb_loc $main} linespec]} {
--- 719,725 ----
# ------------------------------------------------------------------
proc gdbtk_locate_main {} {
set main_names [pref get gdb/main_names]
! debug "Searching $main_names"
foreach main $main_names {
if {![catch {gdb_search functions $main -static 1}] \
&& ![catch {gdb_loc $main} linespec]} {
*************** proc gdbtk_locate_main {} {
*** 740,746 ****
# ------------------------------------------------------------------
proc set_exe_name {exe} {
global gdb_exe_name gdb_exe_changed
! #debug "set_exe_name: exe=$exe gdb_exe_name=$gdb_exe_name"
if {$gdb_exe_name != ""} then {
session_save
--- 740,746 ----
# ------------------------------------------------------------------
proc set_exe_name {exe} {
global gdb_exe_name gdb_exe_changed
! #debug "exe=$exe gdb_exe_name=$gdb_exe_name"
if {$gdb_exe_name != ""} then {
session_save
*************** proc set_exe {} {
*** 762,768 ****
if {$gdb_exe_name == ""} { return }
set err [catch {gdb_cmd "file '$gdb_exe_name'" 1} msg]
if {$err} {
! debug "set_exe ERROR: $msg"
set l [split $msg :]
set errtxt [join [lrange $l 1 end] :]
set msg "Error loading \"$gdb_exe_name\":\n"
--- 762,768 ----
if {$gdb_exe_name == ""} { return }
set err [catch {gdb_cmd "file '$gdb_exe_name'" 1} msg]
if {$err} {
! dbug E "$msg"
set l [split $msg :]
set errtxt [join [lrange $l 1 end] :]
set msg "Error loading \"$gdb_exe_name\":\n"
*************** define_hook gdb_clear_file_hook
*** 1563,1569 ****
proc gdbtk_clear_file {} {
global gdb_target_name
! dbug W "GDBTK_CLEAR_FILE"
# Give widgets a chance to clean up
run_hooks gdb_clear_file_hook
--- 1563,1569 ----
proc gdbtk_clear_file {} {
global gdb_target_name
! debug
# Give widgets a chance to clean up
run_hooks gdb_clear_file_hook
Index: locals.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/locals.tcl,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 locals.tcl
*** locals.tcl 2000/02/07 00:19:42 1.1.1.1
--- locals.tcl 2001/02/06 22:16:14
***************
*** 1,5 ****
! # Local variable window for GDBtk.
! # Copyright 1997, 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
! # Local variable window for Insight.
! # Copyright 1997, 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
*************** class LocalsWin {
*** 60,66 ****
# ------------------------------------------------------------------
method getVariablesBlankPath {} {
global Update
! debug "LocalsWin::getVariablesBlankPath"
return [$_frame variables]
}
--- 60,66 ----
# ------------------------------------------------------------------
method getVariablesBlankPath {} {
global Update
! debug
return [$_frame variables]
}
Index: regwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.7
diff -p -r1.7 regwin.itb
*** regwin.itb 2000/11/29 22:06:49 1.7
--- regwin.itb 2001/02/06 22:16:16
***************
*** 1,5 ****
! # Register display window for GDBtk.
! # Copyright 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
! # Register display window for Insight.
! # Copyright 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
***************
*** 16,22 ****
# ------------------------------------------------------------------
body RegWin::constructor {args} {
global tixOption
! debug "RegWin::constructor"
wm withdraw [winfo toplevel $itk_interior]
gdbtk_busy
--- 16,22 ----
# ------------------------------------------------------------------
body RegWin::constructor {args} {
global tixOption
! debug
wm withdraw [winfo toplevel $itk_interior]
gdbtk_busy
*************** body RegWin::constructor {args} {
*** 44,50 ****
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
body RegWin::destructor {} {
! debug "RegWin::destructor"
save_reg_display_vars
remove_hook gdb_update_hook "$this update"
remove_hook gdb_busy_hook [list $this busy]
--- 44,50 ----
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
body RegWin::destructor {} {
! debug
save_reg_display_vars
remove_hook gdb_update_hook "$this update"
remove_hook gdb_busy_hook [list $this busy]
*************** body RegWin::reg_select { r } {
*** 391,397 ****
set state normal
}
for {set i 0} {$i < 7} {incr i} {
! debug "RegWin format $i $state"
$itk_interior.m.reg.format entryconfigure $i -state $state \
-variable reg_display($r,format)
}
--- 391,397 ----
set state normal
}
for {set i 0} {$i < 7} {incr i} {
! debug "format $i $state"
$itk_interior.m.reg.format entryconfigure $i -state $state \
-variable reg_display($r,format)
}
Index: srcbar.itcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.itcl,v
retrieving revision 1.4
diff -p -r1.4 srcbar.itcl
*** srcbar.itcl 2001/02/01 22:56:27 1.4
--- srcbar.itcl 2001/02/06 22:16:19
*************** class SrcBar {
*** 689,695 ****
# normal - Run button appears, allowing user to run/re-run exe
# ------------------------------------------------------------------
public method _set_runstop {} {
! dbug W $runstop
switch $runstop {
busy {
--- 689,695 ----
# normal - Run button appears, allowing user to run/re-run exe
# ------------------------------------------------------------------
public method _set_runstop {} {
! dbug I $runstop
switch $runstop {
busy {
*************** Do you want to continue?" \
*** 1136,1142 ****
# This indicates what is the inferior state.
# Possible values are: {busy running downloading normal}
public variable runstop normal {
! dbug W "configuring runstop $runstop"
# Set the Run/Stop button accordingly
_set_runstop
--- 1136,1142 ----
# This indicates what is the inferior state.
# Possible values are: {busy running downloading normal}
public variable runstop normal {
! dbug I "configuring runstop $runstop"
# Set the Run/Stop button accordingly
_set_runstop
Index: variables.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/variables.tcl,v
retrieving revision 1.4
diff -p -r1.4 variables.tcl
*** variables.tcl 2000/12/22 15:33:06 1.4
--- variables.tcl 2001/02/06 22:16:20
***************
*** 1,5 ****
! # Variable display window for GDBtk.
! # Copyright 1997, 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
! # Variable display window for Insight.
! # Copyright 1997, 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
*************** class VariableWin {
*** 50,56 ****
# ------------------------------------------------------------------
method build_win {f} {
global tixOption tcl_platform Display
! # debug "VariableWin::build_win"
set width [font measure src-font "W"]
# Choose the default width to be...
set width [expr {40 * $width}]
--- 50,56 ----
# ------------------------------------------------------------------
method build_win {f} {
global tixOption tcl_platform Display
! # debug
set width [font measure src-font "W"]
# Choose the default width to be...
set width [expr {40 * $width}]
*************** class VariableWin {
*** 155,161 ****
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
destructor {
! # debug "VariableWin::destructor"
# Make sure to clean up the frame
catch {destroy $_frame}
--- 155,161 ----
# DESTRUCTOR - destroy window containing widget
# ------------------------------------------------------------------
destructor {
! # debug
# Make sure to clean up the frame
catch {destroy $_frame}
*************** class VariableWin {
*** 184,190 ****
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
method reconfig {} {
! # debug "VariableWin::reconfig"
foreach win [winfo children $itk_interior] {
destroy $win
}
--- 184,190 ----
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
method reconfig {} {
! # debug
foreach win [winfo children $itk_interior] {
destroy $win
}
*************** class VariableWin {
*** 304,310 ****
}
method updateNow {variable} {
! # debug "VariableWin::updateNow $variable"
if {!$Running} {
set text [label $variable]
--- 304,310 ----
}
method updateNow {variable} {
! # debug "$variable"
if {!$Running} {
set text [label $variable]
*************** class VariableWin {
*** 329,335 ****
method postMenu {X Y} {
global Update Display
! # debug "VariableWin::postMenu"
# Quicky for menu posting problems.. How to unpost and post??
--- 329,335 ----
method postMenu {X Y} {
global Update Display
! # debug
# Quicky for menu posting problems.. How to unpost and post??
*************** class VariableWin {
*** 649,655 ****
method open {path} {
global Update
# We must lookup all the variables for this struct
! # debug "VariableWin::open $path"
# Cancel any edits
if {[info exists EditEntry]} {
--- 649,655 ----
method open {path} {
global Update
# We must lookup all the variables for this struct
! # debug "$path"
# Cancel any edits
if {[info exists EditEntry]} {
*************** class VariableWin {
*** 673,679 ****
# ------------------------------------------------------------------
method close {path} {
global Update
! debug "VariableWin::close $path"
# Close the path and destroy all the entry widgets
# Cancel any edits
--- 673,679 ----
# ------------------------------------------------------------------
method close {path} {
global Update
! debug "$path"
# Close the path and destroy all the entry widgets
# Cancel any edits
*************** class VariableWin {
*** 706,712 ****
# OVERRIDE THIS METHOD
method getVariablesBlankPath {} {
! debug "You forgot to override getVariablesBlankPath!!"
return {}
}
--- 706,712 ----
# OVERRIDE THIS METHOD
method getVariablesBlankPath {} {
! dbug -W "You forgot to override getVariablesBlankPath!!"
return {}
}
*************** class VariableWin {
*** 719,725 ****
# ------------------------------------------------------------------
method populate {parent} {
global Update
! debug "VariableWin::populate \"$parent\""
if {[string length $parent] == 0} {
set variables [getVariablesBlankPath]
--- 719,725 ----
# ------------------------------------------------------------------
method populate {parent} {
global Update
! debug "$parent"
if {[string length $parent] == 0} {
set variables [getVariablesBlankPath]
*************** class VariableWin {
*** 805,811 ****
# OVERRIDE THIS METHOD and call it from there
method update {} {
global Update
! debug "VariableWin::update"
# First, reset color on label to black
foreach w $ChangeList {
--- 805,811 ----
# OVERRIDE THIS METHOD and call it from there
method update {} {
global Update
! debug
# First, reset color on label to black
foreach w $ChangeList {
*************** class VariableWin {
*** 838,844 ****
# RECURSION!!
method displayedVariables {top} {
! # debug "VariableWin::displayedVariables"
set variableList {}
set variables [$Hlist info children $top]
foreach var $variables {
--- 838,844 ----
# RECURSION!!
method displayedVariables {top} {
! # debug
set variableList {}
set variables [$Hlist info children $top]
foreach var $variables {
*************** class VariableWin {
*** 855,862 ****
method deleteTree {} {
global Update
! debug "deleteTree"
! # debug "VariableWin::deleteTree"
# set variables [displayedVariables {}]
# Delete all HList entries
--- 855,861 ----
method deleteTree {} {
global Update
! debug
# set variables [displayedVariables {}]
# Delete all HList entries
Index: watch.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/watch.tcl,v
retrieving revision 1.2
diff -p -r1.2 watch.tcl
*** watch.tcl 2000/09/18 17:56:37 1.2
--- watch.tcl 2001/02/06 22:16:21
***************
*** 1,5 ****
! # Watch window for GDBtk.
! # Copyright 1997, 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
--- 1,5 ----
! # Watch window for Insight.
! # Copyright 1997, 1998, 1999, 2001 Red Hat
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
*************** class WatchWin {
*** 39,45 ****
# ------------------------------------------------------------------
method build_win {f} {
global tcl_platform
! #debug "WatchWin::build_win $f"
set Menu [build_menu_helper Watch]
$Menu add command -label Remove -underline 0 \
--- 39,45 ----
# ------------------------------------------------------------------
method build_win {f} {
global tcl_platform
! #debug "$f"
set Menu [build_menu_helper Watch]
$Menu add command -label Remove -underline 0 \
*************** class WatchWin {
*** 125,131 ****
}
method postMenu {X Y} {
! # debug "WatchWin::postMenu $x $y"
set entry [getEntry $X $Y]
--- 125,131 ----
}
method postMenu {X Y} {
! # debug "$x $y"
set entry [getEntry $X $Y]
*************** class WatchWin {
*** 178,184 ****
# (or use deleteTree)
# ------------------------------------------------------------------
method getVariablesBlankPath {} {
! # debug "WatchWin::getVariablesBlankPath"
set list {}
set variables [displayedVariables {}]
--- 178,184 ----
# (or use deleteTree)
# ------------------------------------------------------------------
method getVariablesBlankPath {} {
! # debug
set list {}
set variables [displayedVariables {}]