News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

GDB problem

Started by ennom, June 05, 2010, 07:22:12 PM

Previous topic - Next topic

ennom

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 -
QuoteCannot 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!

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ennom

#2
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]

ollydbg

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ennom

Quote from: ollydbg on June 06, 2010, 09:16:05 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.

ennom

and i'm able to see programs text using 'l' command in gdb:

[attachment deleted by admin]

Jenna

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.

ennom

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

oBFusCATed

Looks like the compiler has embedded the paths to the sources in a wrong way.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]