This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: session saving


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]