10

I use Code::Blocks 12.11 and Cygwin gdb in Windows 8. I configured the cygwin gdb in code::blocks, when debug, it reports "cannot open file" error. Using gdb in command line is alright.

I found this discussion from web, but I cannot find the registery entry. My guess is that the Debugger plugin cannot pass a right path name to gdb, there is ">>" in prefix of the path, i copied this into editor and it turns out to be two "sub" charaters (1A in ascii).

Here is the error log, the ">>" is added by hand, because when I copied it here, the "sub" charaters don't show.

Debugger name and version: GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Child process PID: 21936
Cannot open file: >>/cygdrive/e/code/test/main.cpp
At >>/cygdrive/e/code/test/main.cpp:17
Debugger finished with status 0

My question is

1.How can I make the gdb work in the Code::Blocks

2.Are the two "sub" charaters normal and why do they appear, how can I remove it.

1
  • 1
    I tried it in Windows 7-64, still the same Commented Sep 2, 2013 at 6:25

1 Answer 1

5

I made it work by doing the following:

I added a String Value under

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2

and

HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\Cygwin\mounts v2

(none of the folders were there, so I had to create them manually by selecting New->Key)

with the following parameters:

name: cygdrive prefix

value: /cygdrive

Sign up to request clarification or add additional context in comments.

5 Comments

thanks very much for your help, I don't know a lot about the registry things, but your answer really solved my problem
I confirm this is still the fix in Codeblocks 13.12, and the key under HKEY_CURRENT_USER is sufficient.
What if you are using Ubuntu ?
Then I would not need cygwin, which is not the point of this question.
I did this baffling answer but failed. Maybe I did it wrong? It needs a much clearer explanation please.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.