when you restart gdbtk.
2000-03-27 James Ingham <jingham@leda.cygnus.com>
* interface.tcl (gdbtk_quit): Let the window manager store away
the list of active windows before quitting.
(gdbtk_tcl_preloop): Open all the windows that were active in the
former session.
* prefs.tcl (pref_set_defaults): Set the default value of the
"gdb/window/active" pref. Stores the list of active windows.
* managedwin.itb (ManagedWin::pickle): New method - store away
instructions to recreate this window.
(ManagedWin::shutdown): New Method - run through the active windows
pickling them all.
(ManagedWin::startup): Restore all the saved active windows.
* managedwin.ith: Declare pickle, shutdown & startup.
* tclIndex: regenerate.
+2000-03-27 James Ingham <jingham@leda.cygnus.com>
+
+ * interface.tcl (gdbtk_quit): Let the window manager store away
+ the list of active windows before quitting.
+ (gdbtk_tcl_preloop): Open all the windows that were active in the
+ former session.
+ * prefs.tcl (pref_set_defaults): Set the default value of the
+ "gdb/window/active" pref. Stores the list of active windows.
+ * managedwin.itb (ManagedWin::pickle): New method - store away
+ instructions to recreate this window.
+ (ManagedWin::shutdown): New Method - run through the active windows
+ pickling them all.
+ (ManagedWin::startup): Restore all the saved active windows.
+ * managedwin.ith: Declare pickle, shutdown & startup.
+ * tclIndex: regenerate.
+
2000-03-10 James Ingham <jingham@leda.cygnus.com>
* targetselection.ith (get_target_list): Should be a proc, since
# then we will have called pre_add_symbol, which would set us to busy,
# but not the corresponding post_add_symbol. Do this here just in case...
after idle gdbtk_idle
- set src [ManagedWin::open SrcWin]
- debug "In preloop, with src: \"$src\" & error: \"$::errorInfo\""
+ ManagedWin::startup
+
SrcWin::point_to_main
set msg ""
catch {gdb_cmd "info files"} msg
if {[regexp {Symbols from "(.*)"\.} $line1 dummy name]} {
set gdb_exe_name $name
}
+
+
gdbtk_update
}
# ------------------------------------------------------------------
proc gdbtk_quit {} {
if {[gdbtk_quit_check]} {
+ ManagedWin::shutdown
pref_save
gdb_force_quit
}
}
}
+ #
# Run
if {$auto_start} {
}
}
+# ------------------------------------------------------------
+# pickle - This is the base class pickle method. It returns a
+# a command that can be used to recreate this particular window.
+# ------------------------------------------------------------
+body ManagedWin::pickle {} {
+ return [list ManagedWin::open [namespace tail [info class]]]
+}
body ManagedWin::reveal {} {
# Do this update to flush all changes before deiconifying the window.
}
}
+# ------------------------------------------------------------------
+# shutdown - This writes all the active windows to the preferences file,
+# so they can be restored at startup.
+# FIXME: Currently assumes only ONE window per type...
+# ------------------------------------------------------------------
+
+body ManagedWin::shutdown {} {
+ set activeWins {}
+ foreach win $manage_active {
+ if {[$win isa ManagedWin]} {
+ lappend activeWins [$win pickle]
+ }
+ }
+ pref set gdb/window/active $activeWins
+}
+
+# ------------------------------------------------------------------
+# startup - This restores all the windows that were opened at shutdown.
+# FIXME: Currently assumes only ONE window per type...
+# ------------------------------------------------------------------
+
+body ManagedWin::startup {} {
+ debug "Got active list [pref get gdb/window/active]"
+
+ foreach cmd [pref get gdb/window/active] {
+ eval $cmd
+ }
+}
+
body ManagedWin::open_dlg {class args} {
set newwin [eval _open $class $args]
method destroy_toplevel {}
method quit_if_last {} {return 1}
method enable {on}
+ method pickle {}
method reveal {}
method window_name {wname {iname ""}}
proc open_dlg {class args}
proc init {}
proc restart {}
+ proc startup {}
+ proc shutdown {}
}
protected {
}
#now loop through all sections writing out values
- lappend secs load console src reg stack locals watch bp search process geometry help browser kod
+ lappend secs load console src reg stack locals watch bp search \
+ process geometry help browser kod window
foreach section $secs {
puts $fd "\[$section\]"
pref define gdb/load/port "/dev/ttyS0"
}
+ # The list of active windows:
+ pref define gdb/window/active {}
+
# Console defaults
pref define gdb/console/prompt "(gdb) "
pref define gdb/console/deleteLeft 1
pref define gdb/src/PC_TAG green
pref define gdb/src/STACK_TAG gold
pref define gdb/src/BROWSE_TAG \#9595e2
- pref define gdb/src/active 1
pref define gdb/src/handlebg red
pref define gdb/src/bp_fg red
pref define gdb/src/temp_bp_fg orange
# Various possible "main" functions. What's for Java?
pref define gdb/main_names [list MAIN___ MAIN__ main]
+
+ # These are the classes of warning dialogs, and whether the user plans
+ # to ignore them.
+ pref define gdb/warnings/signal 0
}
# This traces the global/fixed font and forces src-font to
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(::tty::_xterm_rgb) [list source [file join $dir inferior_term.tcl]]
+set auto_index(::tty::create) [list source [file join $dir inferior_term.tcl]]
+set auto_index(::tty::destroy) [list source [file join $dir inferior_term.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]]
set auto_index(gdbtk_update) [list source [file join $dir interface.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(WarningDlg) [list source [file join $dir warning.tcl]]
+set auto_index(::WarningDlg::destructor) [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]]
set auto_index(AttachDlg) [list source [file join $dir attachdlg.ith]]
set auto_index(::ManagedWin::window_name) [list source [file join $dir managedwin.itb]]
set auto_index(::ManagedWin::reveal) [list source [file join $dir managedwin.itb]]
set auto_index(::ManagedWin::restart) [list source [file join $dir managedwin.itb]]
+set auto_index(::ManagedWin::shutdown) [list source [file join $dir managedwin.itb]]
+set auto_index(::ManagedWin::startup) [list source [file join $dir managedwin.itb]]
set auto_index(::ManagedWin::open_dlg) [list source [file join $dir managedwin.itb]]
set auto_index(::ManagedWin::open) [list source [file join $dir managedwin.itb]]
set auto_index(::ManagedWin::_open) [list source [file join $dir managedwin.itb]]
set auto_index(::SrcTextWin::FillSource) [list source [file join $dir srctextwin.itb]]
set auto_index(::SrcTextWin::FillAssembly) [list source [file join $dir srctextwin.itb]]
set auto_index(::SrcTextWin::FillMixed) [list source [file join $dir srctextwin.itb]]
+set auto_index(::SrcTextWin::_highlightAsmLine) [list source [file join $dir srctextwin.itb]]
set auto_index(::SrcTextWin::location) [list source [file join $dir srctextwin.itb]]
set auto_index(::SrcTextWin::LoadFile) [list source [file join $dir srctextwin.itb]]
set auto_index(::SrcTextWin::display_line) [list source [file join $dir srctextwin.itb]]