[Patch]: Path problems when setting breakpoints using mingw-build-gdb

秦巍
2007-02-03T02:33:20Z

Dears,

When using mingw-build-gdb on windows.
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.
Maybe the defined SLASH_STRING is not correct on windows.

diff -ruN current_cvs/gdb-6.6/gdb/defs.h gdb-6.6/gdb/defs.h
--- current_cvs/gdb-6.6/gdb/defs.h 2007-02-03 09:43:50.000000000
+0800
+++ gdb-6.6/gdb/defs.h 2007-02-03 09:48:10.000000000 +0800
@@ -1186,8 +1186,12 @@
#endif

#ifndef SLASH_STRING
+#if defined (__MSDOS__) || defined (_WIN32)
+#define SLASH_STRING "\\"
+#else
#define SLASH_STRING "/"
#endif
+#endif

/* Provide default definitions of PIDGET, TIDGET, and MERGEPID.
The name ``TIDGET'' is a historical accident. Many uses of TIDGET

Best regards,
Qinwei
Mail qinwei@sunnorth.com.cn
Phone +86-010-62981668-2708
Fax +86-010-62985972