[RFA] most-recently used file fix

Martin M. Hunt hunt@redhat.com
Fri Jan 11 13:54:00 GMT 2002


This fixes a bug on Windows where loading a file from the 
most-recently used list (under the File pulldown menu) fails.

-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.



2002-01-11  Martin M. Hunt  <hunt@redhat.com>

        * library/interface.tcl (gdbtk_tcl_exec_file_display): 
        Set pathname in host-independent manner using "file" and
	gdb_current_directory.

Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.39
diff -u -p -r1.39 interface.tcl
--- interface.tcl	2002/01/08 19:34:48	1.39
+++ interface.tcl	2002/01/11 21:39:25
@@ -769,10 +769,9 @@ proc gdbtk_tcl_exec_file_display {filena
   # quotes, so we need to strip them here.
   # 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"
+  if {[file tail $filename] == $filename} {
+    # want full pathname
+    set filename [file join $::gdb_current_directory $filename]
   }
   set_exe_name $filename
   set gdb_exe_changed 0



More information about the Insight mailing list