News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Problem in debugging on Code::Blocks via gdr(Cygwin)

Started by christian.cabizza, May 23, 2022, 12:36:13 PM

Previous topic - Next topic

christian.cabizza

Hi, I still have in my just installed IDE the known problem:

Error creating process /cygdrive/c/Users/CHRIST~1.CAB/ONEDRI~1/DOCUME~1/Proj/Test/Test/C:/Users/CHRIST~1.CAB/ONEDRI~1/DOCUME~1/Proj/Test/Test/bin/Debug/Test.exe, (error 2).

This is Cygwin version:
3.3.5-341.x86_64

C::B infos
Name             : Code::Blocks
Version          : 20.03-r11983
SDK Version      : 2.0.0
Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : info@codeblocks.org
Website          : http://www.codeblocks.org

wxWidgets Library (wxMSW port)
Version 3.1.3 (Unicode: wchar_t, debug level: 1),
compiled at Nov  1 2019 18:53:26

Runtime version of toolkit used is 10.0.

Cygwin is installed in the default directory c:\cygwin64\ and bin directory is correctly addressed in PATH env variable.

May you help me?

stahta01

#1
Duplicated the problem with CB 20.03.

Active debugger config: GDB/CDB debugger:Cygwin64
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: H:\test_cbp\testcygwin\
Adding source dir: H:\test_cbp\testcygwin\
Adding file: H:\test_cbp\testcygwin\bin\Debug\testcygwin.exe
Changing directory to: H:/test_cbp/testcygwin/.
Set variable: PATH=.;H:\cygwin64\bin;H:\cygwin64;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Users\Confident\AppData\Local\Microsoft\WindowsApps
Starting debugger: H:\cygwin64\bin\gdb.exe -nx -fullname -quiet  -args H:/test_cbp/testcygwin/bin/Debug/testcygwin.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) (Cygwin 11.2-1) 11.2
Error creating process /cygdrive/h/test_cbp/testcygwin/H:/test_cbp/testcygwin/bin/Debug/testcygwin.exe, (error 2).
Debugger finished with status 0

The problem did not exist with the May 15 Nightly build.

Active debugger config: GDB/CDB debugger:Cygwin64
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: H:\test_cbp\testcygwin\
Adding source dir: H:\test_cbp\testcygwin\
Adding file: H:\test_cbp\testcygwin\bin\Debug\testcygwin.exe
Changing directory to: H:/test_cbp/testcygwin/.
Set variable: PATH=.;H:\cygwin64\bin;H:\cygwin64;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Users\Confident\AppData\Local\Microsoft\WindowsApps
Starting debugger: H:\cygwin64\bin\gdb.exe -nx -fullname -quiet  -args /cygdrive/h/test_cbp/testcygwin/bin/Debug/testcygwin.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) (Cygwin 11.2-1) 11.2
Child process PID: 11300
At h:\test_cbp\testcygwin\main.cpp:8
Continuing...
[Inferior 1 (process 11300) exited normally]
Debugger finished with status 0


https://forums.next.codeblocks.org/index.php/topic,24968.0.html

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

AndrewCot

CB 20.03 and Cygwin will allow you to build apps, BUT will NOT allow you do debug anything. This was fixed last year in the nightly build around Aug/Sep from memory (I did the changes). As such please grab the nightly build from the nightly build forum and follow the instructions on the first page of the latest nightly thread and try again.
Also check your path does not include spaces or any non ascii characters as these could cause issues. The path has looks to be a onedrive (ONEDRI~1) in it, which could be an issue if it is a mapped drive to the MS onedrive cloud storage.
I would suggest a going back to a simple hello world test in say C:\test to ensure you have Cygwin and C::B working together first.