This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch]: Path problems when setting breakpoints using mingw-build-gdb
- From: Eli Zaretskii <eliz at gnu dot org>
- To: =?big5?b?r7PE3g==?=<qinwei at sunnorth dot com dot cn>
- Cc: gdb-patches at sourceware dot org, bjgnu at sunnorth dot com dot cn
- Date: Sat, 03 Feb 2007 13:26:06 +0200
- Subject: Re: [Patch]: Path problems when setting breakpoints using mingw-build-gdb
- References: <OFBA6E1623.0870EACC-ON48257277.000DE389-48257277.000DFF3E@sunnorth.com.cn>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Cc: bjgnu@sunnorth.com.cn
> From: =?Big5?B?r7PE3g==?=<qinwei@sunnorth.com.cn>
> Date: Sat, 3 Feb 2007 10:33:48 +0800
>
> When using mingw-build-gdb on windows.
What is the GDB version you used? where did you get the binary?
> sending command "b main.c:3",
> gdb shows:
> No line 3 in file "F:\gcd\2310gcd\main.c".
> but sending command "b main",
> gdb shows:
> Breakpoint 1 at 0xa00011dc: file F:\gcd\2310gcd/main.c, line 3.
Could you please show a complete self-contained example, including the
source and the compilation command line? Also, please tell what
version of GCC you used. I'd like to try to reproduce this on my
machine.
> Maybe the defined SLASH_STRING is not correct on windows.
Did you try applying that patch, and if so, did the problem go away?
Personally, I don't think it's related at all, because SLASH_STRING
should not be used where an absolute file name is taken apart to look
for the directory and the basename. Instead, GDB should use other
macros, such as IS_DIR_SEPARATOR (from include/filenames.h), which do
cater to Windows filenames.
SLASH_STRING is only used to _construct_ file names, and that is okay,
since the Windows file I/O APIs recognize both \ and / as separators.