Bug 12843 - gdb failed to set a breakpoint on Windows
Summary: gdb failed to set a breakpoint on Windows
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 critical
Target Milestone: 7.4
Assignee: Keith Seitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 01:56 UTC by asmwarrior
Modified: 2014-05-28 19:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asmwarrior 2011-06-05 01:56:59 UTC
I build a gdb-7.3.50.20110604 cvs gdb version under MinGW and MSYS.

But when debugging, gdb failed to set a breakpoint, it seems it failed to handle the windows style file path.

look at the log:

> break "E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/parserthread.cpp:524"
No source file named E.
Breakpoint 2 ("E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/parserthread.cpp:524) pending.
>>>>>>cb_gdb:

You see, "No source file named E.", this is the error message.

the gdb 20110401 cvs snapshot build works quite well on setting breakpoints. 

I found that the change in linespec.c in
http://sourceware.org/ml/gdb-cvs/2011-05/msg00255.html
and
http://sourceware.org/ml/gdb-cvs/2011-05/msg00196.html

maybe cause this issue.

If I replace the linespec.c with an old version of linespec.c before May 24, 2011, then gdb build 20110604snapshot can correctly set breakpoints under Windows. 

the related discussion is 
http://sourceware.org/ml/gdb/2011-06/msg00030.html

asmwarrior
ollydbg from codeblocks' forum
Comment 1 cvs-commit@gcc.gnu.org 2011-11-11 19:52:50 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	kseitz@sourceware.org	2011-11-11 19:52:47

Modified files:
	gdb            : ChangeLog linespec.c 

Log message:
	PR gdb/12843
	* linespec.c (locate_first_half): Keep ':' if it looks
	like it could be part of a Windows path starting with
	a drive letter.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13507&r2=1.13508
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linespec.c.diff?cvsroot=src&r1=1.130&r2=1.131
Comment 2 cvs-commit@gcc.gnu.org 2011-11-11 19:53:16 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	kseitz@sourceware.org	2011-11-11 19:53:13

Modified files:
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.base: linespecs.exp 

Log message:
	PR gdb/12843
	* gdb.base/linespecs.exp: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2933&r2=1.2934
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/linespecs.exp.diff?cvsroot=src&r1=NONE&r2=1.1
Comment 3 Keith Seitz 2011-11-11 19:59:26 UTC
Patch committed.
Comment 4 Jackie Rosen 2014-02-16 19:34:54 UTC
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.