From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14497 invoked by alias); 6 Dec 2011 19:23:45 -0000 Received: (qmail 14476 invoked by uid 22791); 6 Dec 2011 19:23:44 -0000 X-SWARE-Spam-Status: No, hits=1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Dec 2011 19:23:31 +0000 Received: by wgbds11 with SMTP id ds11so5820773wgb.12 for ; Tue, 06 Dec 2011 11:23:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.1.131 with SMTP id 3mr642681wed.85.1323199410257; Tue, 06 Dec 2011 11:23:30 -0800 (PST) Received: by 10.216.0.209 with HTTP; Tue, 6 Dec 2011 11:23:30 -0800 (PST) Date: Tue, 06 Dec 2011 19:23:00 -0000 Message-ID: Subject: Patch for setting breakpoints in source window From: Jeffrey Armstrong To: insight@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00017.txt.bz2 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. =A0The culprit appears to be a failure to wrap the filename in quotes when passing it to gdb. =A0Normally 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. =A0I've attached a simple patch below that shouldn't have any detrimental side effects on other OSes. Index: gdb/gdbtk/library/srctextwin.itb =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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"