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: [PATCH] source.s: Fix problem handling windows like path with MinGW


> From: "Michael Fischer" <fischermi@t-online.de>
> Date: Sat, 17 Jun 2006 18:23:23 +0200
> 
> the patch below will fix the problem if an application sends path
> information like "d:\foo1\foo2" instead of "/d/foo1/foo2"

Thank you for your contribution.

However, I'm not sure I understand the details and/or the motivation.
The patch is MinGW-specific, so I'd expect the source path to use `;',
not `:', to separate directories.  That is what I see in my
MinGW-compiled GDB (built for native Windows debugging).

In other words, DIRNAME_SEPARATOR is supposed to be `;' in this
build.  Can you explain how it became `:'?

> Here are some examples how the path could look like:
> 
> 1. "D:\Projekte\Eclipse\Test:$cwd"
> 2. "D:\Projekte\Eclipse\Test:D:\Projekte\Eclipse\Test\src:D:\Projekte\Eclipse\Test\inc:$cwd"

If you want GDB to distinguish between the two different uses of `:',
then I think we shouldn't even try.  While it's probable that in
"d:\foo:c:\bar" the 1st and the 3rd colon are not separators but parts
of the drive letter, nothing prevents a user from legitimately using
it in a non-probable way, i.e. the user could really mean to search
the directories `d', `\foo', `c', and `\bar'.  GDB has no business
second-guessing the user's intent, IMHO.

The solution to this, IMO, is to make sure your GDB uses `;' to
separate directories in paths.


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