This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Patch: session saving
- To: tromey at cygnus dot com
- Subject: Re: Patch: session saving
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Wed, 13 Dec 2000 17:27:08 -0500
- CC: Insight List <insight at sourceware dot cygnus dot com>
- Organization: Red Hat , Inc. - Toronto
- References: <87zoij96f7.fsf@creche.cygnus.com>
Tom Tromey wrote:
>
> This patch implements simple session saving for Insight.
>
(...)
>
> Future work includes:
>
(...)
>
> * Save target and target settings
>
I did this one following your instructions.
It works beautifully.
Thanks for the hints.
Fernando
Here is the patch:
* session.tcl (session_save): Save target name.
(session_load): Restore target name.
Index: session.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/session.tcl,v
retrieving revision 1.3
diff -c -p -r1.3 session.tcl
*** session.tcl 2000/12/07 21:56:25 1.3
--- session.tcl 2000/12/13 22:23:01
*************** proc session_save {} {
*** 58,63 ****
--- 58,65 ----
# the session, as returned by session_list.
#
proc session_load {name} {
+ global gdb_target_name
+
# gdb sessions are named after the executable.
set key gdb/session/$name
*************** proc session_load {name} {
*** 86,92 ****
set_exe
}
! # FIXME: handle target
}
#
--- 88,97 ----
set_exe
}
! if {[info exists values(target)]} {
! debug "Restoring Target: $values(target)"
! set gdb_target_name $values(target)
! }
}
#
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9