+2001-05-14 Keith Seitz <keiths@cygnus.com>
+
+ * library/interface.tcl (gdbtk_quit_check): Don't save sessions
+ here. It doesn't work for the Console Window.
+ (gdbtk_cleanup): Save session information here.
+ (gdbtk_tcl_exec_file_display): When files are loaded,
+ get the full pathname to the exe.
+
2001-05-11 Tom Tromey <tromey@redhat.com>
* library/prefs.tcl (pref_save): Fix bug when key in gdb space has
}
}
- # If we have an executable file loaded, save a session associated to it
- if {$gdb_exe_name != ""} {
- session_save
- }
return 1
}
# before exiting. Last chance to cleanup!
# ------------------------------------------------------------------
proc gdbtk_cleanup {} {
+ global gdb_exe_name
+
+ # Save the session
+ if {$gdb_exe_name != ""} {
+ session_save
+ }
+
# This is a sign that it is too late to be doing updates, etc...
set ::gdb_shutting_down 1
# commands, then we cannot look for main.
# ------------------------------------------------------------------
proc gdbtk_tcl_exec_file_display {filename} {
- global gdb_loaded gdb_running gdb_exe_name gdb_target_changed
+ global gdb_exe_changed
# DO NOT CALL set_exe here!
# set_exe calls file command with the filename in
# quotes, so we need to strip them here.
- set gdb_exe_name [string trim $filename \']
+ # We need to make sure that we turn filename into
+ # an absolute path or sessions won't work.
+ set filename [string trim $filename \']
+ if {[string index $filename 0] != "/"} {
+ set pwd [pwd]
+ set filename "$pwd/$filename"
+ }
+ set_exe_name $filename
+ set gdb_exe_changed 0
SrcWin::point_to_main
}