This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] 12843


On 08/26/2011 11:22 AM, Tom Tromey wrote:
"Keith" == Keith Seitz<keiths@redhat.com> writes:

Keith> PR gdb/12843 Keith> * linespec.c (locate_first_half): Do not stop on a colon Keith> if the next character is a directory separator character.

Ok.

I suspect we should tighten this further so that only drive letters work
and not oddball stuff like "break file:/whatever.c:73".  What do you
think?

I think we can safely do that -- especially since '/' is verboten on unix. So in that case, "file:/whatever.c" parses to the file "whatever.c" in the directory "file:", and we want to keep the whole thing together anyway.


Mind you, this doesn't solve the general case of colons in filenames, which is still broken.

Note: I've renamed the test to linespecs.exp, hoping that this file will grow into a full-fledged specification for future linespec work. Which I hope to do sometime soon. :-)

How about this? [Tested on x86_64-linux and i686-pc-cygwin (with much pain).]

Keith

ChangeLog
2011-08-30  Keith Seitz  <keiths@redhat.com>

	PR gdb/12843
	* linespec.c (locate_first_half): Keep ':' if it looks
	like it could be part of a drive letter or filename.

testsuite/ChangeLog
2011-08-30  Keith Seitz  <keiths@redhat.com>

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

Attachment: 12843-2.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]