RFC: add relative file name handling for linespecs

Tom Tromey tromey@redhat.com
Mon Jan 16 19:01:00 GMT 2012


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Tom> || (HAS_DRIVE_SPEC (filename) && len - search_len == 2)

Eli> Yes, I think it will.

I ended up going with:

	  || (HAS_DRIVE_SPEC (filename)
	      && STRIP_DRIVE_SPEC (filename) == &filename[len - search_len]));

... because STRIP_DRIVE_SPEC exists already and this lets us avoid
hard-coding a "2" into the code here.

Tom



More information about the Gdb-patches mailing list