From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: tromey@cygnus.com Cc: Insight List Subject: Re: Patch: session saving Date: Wed, 13 Dec 2000 14:27:00 -0000 Message-id: <3A37F7BC.742F7CED@cygnus.com> References: <87zoij96f7.fsf@creche.cygnus.com> X-SW-Source: 2000-q4/msg00424.html 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