This is the mail archive of the gdb-cvs@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]

src/gdb ChangeLog utils.c


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2011-12-27 04:03:58

Modified files:
	gdb            : ChangeLog utils.c 

Log message:
	Improve gdb_realpath for Windows hosts
	
	On Windows hosts, gdb_realpath is just an xstrdup. This makes filename
	comparisons on Windows very chancy. Normally, we would normalize both
	paths, and then compare.  But since the normalization doesn't do
	anything, two equivalent names on Windows might not match.  This can
	happen when trying to insert a breakpoint using the fullpath of a file.
	For instance, if the compiler generated debug info that says that
	the compilation directory is: `c:\\some\\double\\slashes\\dir', then
	trying to insert a breakpoint on `c:/some/double/slashes/dir/foo.c:4'
	does not work:
	
	(gdb) b c:/some/double/slashes/dir/foo.c:4
	No source file named c:/some/double/slashes/dir/foo.c:4.
	(gdb) b c:\some\double\slashes\dir\foo.c:4
	No source file named c:\some\double\slashes\dir\foo.c:4.
	
	This fixes the problem by enhancing gdb_realpath on Windows hosts.
	The code is inspired from libiberty's lrealpath.
	
	gdb/ChangeLog:
	
	* utils.c (gdb_realpath): Add better support for Windows hosts.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13666&r2=1.13667
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/utils.c.diff?cvsroot=src&r1=1.269&r2=1.270


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