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]: Path problems when setting breakpoints using mingw-build-gdb


> 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.


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