public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Patch for setting breakpoints in source window
@ 2011-12-06 19:23 Jeffrey Armstrong
  2012-02-28 21:58 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Armstrong @ 2011-12-06 19:23 UTC (permalink / raw)
  To: insight

I've been experiencing issues with Insight compiled via MinGW under
Windows where the user cannot set breakpoints via the source window
under certain circumstances.  The culprit appears to be a failure to
wrap the filename in quotes when passing it to gdb.  Normally this
isn't a problem, but when a space is present in the full path name, as
is so common on Windows, the breakpoint fails to be set.  I've
attached a simple patch below that shouldn't have any detrimental side
effects on other OSes.

Index: gdb/gdbtk/library/srctextwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v
retrieving revision 1.46
diff -u -r1.46 srctextwin.itb
--- gdb/gdbtk/library/srctextwin.itb	9 Nov 2009 19:39:31 -0000	1.46
+++ gdb/gdbtk/library/srctextwin.itb	6 Dec 2011 19:11:58 -0000
@@ -1759,7 +1759,7 @@
       set set_cmd [list gdb_set_bp "*$addr"]
     }
     src {
-      set set_cmd [list gdb_set_bp "$current(filename):$addr"]
+      set set_cmd [list gdb_set_bp "\"$current(filename)\":$addr"]
     }
   }


--
Jeffrey Armstrong
jeffrey.armstrong@approximatrix.com
Approximatrix, LLC - http://www.approximatrix.com/
"Solutions for Numerical Computing"

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

* Re: Patch for setting breakpoints in source window
  2011-12-06 19:23 Patch for setting breakpoints in source window Jeffrey Armstrong
@ 2012-02-28 21:58 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2012-02-28 21:58 UTC (permalink / raw)
  To: Jeffrey Armstrong; +Cc: insight

On 12/06/2011 11:23 AM, Jeffrey Armstrong wrote:
> I've been experiencing issues with Insight compiled via MinGW under
> Windows where the user cannot set breakpoints via the source window
> under certain circumstances.  The culprit appears to be a failure to
> wrap the filename in quotes when passing it to gdb.  Normally this
> isn't a problem, but when a space is present in the full path name, as
> is so common on Windows, the breakpoint fails to be set.  I've
> attached a simple patch below that shouldn't have any detrimental side
> effects on other OSes.

Hi,

Thank you for the patch. You're right, that should not present any 
problems on any platforms. I've committed your patch with the following 
ChangeLog:

2012-02-28  Keith Seitz  <keiths@redhat.com>

	From Jeffrey Armstrong  <jeffrey.armstrong@approximatrix.com>:
	* library/srctextwin.itb (lookup_line): Quote the filename
	to gdb_set_bp.

Keith

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

end of thread, other threads:[~2012-02-28 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-06 19:23 Patch for setting breakpoints in source window Jeffrey Armstrong
2012-02-28 21:58 ` Keith Seitz

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