public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com>
To: insight@sourceware.org
Subject: Patch for setting breakpoints in source window
Date: Tue, 06 Dec 2011 19:23:00 -0000	[thread overview]
Message-ID: <CAONw715PVBxwA=ieuh7=8LEDoLMZQDgV7ggKWf71o90cyjsqcg@mail.gmail.com> (raw)

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"

             reply	other threads:[~2011-12-06 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 19:23 Jeffrey Armstrong [this message]
2012-02-28 21:58 ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAONw715PVBxwA=ieuh7=8LEDoLMZQDgV7ggKWf71o90cyjsqcg@mail.gmail.com' \
    --to=jeffrey.armstrong@approximatrix.com \
    --cc=insight@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).