Code::Blocks Forums

User forums => Help => Topic started by: ennom on June 05, 2010, 07:22:12 pm

Title: GDB problem
Post by: ennom on June 05, 2010, 07:22:12 pm
Hi there!
First of all - i'm newbie in cb, cygwin and gdb. Just downloaded cb to try out. I wrote a little program to see how it going in cb. I have problem with gdb(or cb? or cygwin? or with all of them? :)) when trying to stop at breakpoint -
Quote
Cannot open file: C:\src\cb_test\cb_test\->->\cygdrive\c\src\cb_test\cb_test\main.cpp
At /cygdrive/c/src/cb_test/cb_test/main.cpp:26
any ideas?
gdb is GNU gdb 6.8.0.20080328
cb is 10.05
cygwin is CYGWIN_NT-6.1-WOW64
thank u!
Title: Re: GDB problem
Post by: oBFusCATed on June 05, 2010, 11:11:13 pm
What are those strange characters in the paths?
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks#Path_with_spaces
Title: Re: GDB problem
Post by: ennom on June 06, 2010, 08:47:53 am
Here is how gdb output looks like. There are no any whitespaces in my path. I suppose that two rectangles in path are two "right arrow" chars, but i'm lack of appropriate font.

[attachment deleted by admin]
Title: Re: GDB problem
Post by: ollydbg on June 06, 2010, 09:16:05 am
Look: the gdb can't find the source file located by \cygdrive\XXXX

I guess your compiler is cygwin gcc, but your debugger is native gdb. So, they are not compatible.
Title: Re: GDB problem
Post by: ennom on June 06, 2010, 09:32:32 am
but your debugger is native gdb
Yeah, compiler is cygwin gcc, but what do you mean 'native'? The only gdb i have is from cygwin, how then it can be incompatible with the compiler?

btw, thank you all guys.
Title: Re: GDB problem
Post by: ennom on June 06, 2010, 09:37:18 am
and i'm able to see programs text using 'l' command in gdb:

[attachment deleted by admin]
Title: Re: GDB problem
Post by: Jenna on June 06, 2010, 10:33:44 am
Do you really have right-arrow chars in your path ?
Try it with no special chars in path, this can always be the cause for such issues.
Title: Re: GDB problem
Post by: ennom on June 06, 2010, 10:50:34 am
No, i don't have any arrows in path. Path to program code is c:\src\cb_test\cb_test\main.cpp.  I don't know what this mean('@' is placeholder here for char with code 0x1a -i'm unable to print it here, look to pic at my 2-nd post)
Quote
Cannot open file: C:\src\cb_test\cb_test\@@\cygdrive\c\src\cb_test\cb_test\main.cpp
At @@/cygdrive/c/src/cb_test/cb_test/main.cpp:26
but this is how cb shows problem in gdb.
Title: Re: GDB problem
Post by: oBFusCATed on June 06, 2010, 12:26:50 pm
Looks like the compiler has embedded the paths to the sources in a wrong way.