public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFA] most-recently used file fix
@ 2002-01-11 13:54 Martin M. Hunt
  2002-01-11 14:14 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Martin M. Hunt @ 2002-01-11 13:54 UTC (permalink / raw)
  To: Insight Mailing List

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] most-recently used file fix
  2002-01-11 13:54 [RFA] most-recently used file fix Martin M. Hunt
@ 2002-01-11 14:14 ` Keith Seitz
  2002-01-11 14:20   ` Martin M. Hunt
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2002-01-11 14:14 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: Insight Mailing List

Yes, indeed!

What the heck was I thinking when I checked that muck in?

Thanks,
Keith

On Fri, 11 Jan 2002, Martin M. Hunt wrote:

> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] most-recently used file fix
  2002-01-11 14:14 ` Keith Seitz
@ 2002-01-11 14:20   ` Martin M. Hunt
  0 siblings, 0 replies; 3+ messages in thread
From: Martin M. Hunt @ 2002-01-11 14:20 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Mailing List

Checked in.

-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-11 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-11 13:54 [RFA] most-recently used file fix Martin M. Hunt
2002-01-11 14:14 ` Keith Seitz
2002-01-11 14:20   ` Martin M. Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).