Code::Blocks Forums
User forums => Help => Topic started by: layee99 on September 09, 2016, 10:17:14 pm
-
I installed Code::Blocks on my Windows 7 32 bit and everything works fine, but when I installed it on a Windows 10 64 bit system, the debugger doesn't work. I'm using Cygwin GCC Compiler and the Default GDB/CDB debugger installed on C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe. Here are some outputs from the debugger window:
[debug]> show version
[debug]GNU gdb (GDB) 7.6.1
[debug]> run
[debug]Starting program: C:/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe
Child process PID: 11032
[debug][New Thread 11032.0x2330]
[debug][New Thread 11032.0x157c]
[debug][New Thread 11032.0x19ec]
[debug][New Thread 11032.0x15d0]
[debug][New Thread 11032.0x1b5c]
[debug]Program received signal ?, Unknown signal.
[debug]0x748296c2 in RaiseException () from C:\WINDOWS\SysWoW64\KernelBase.dll
[debug]>>>>>>cb_gdb:
In RaiseException () (C:\WINDOWS\SysWoW64\KernelBase.dll)
[debug]> bt 30
[debug]#0 0x748296c2 in RaiseException () from C:\WINDOWS\SysWoW64\KernelBase.dll
[debug]#1 0x61081614 in SetThreadName(unsigned long, char const*) () from C:\cygwin\bin\cygwin1.dll
[debug]#2 0x61004a6b in cygthread::create () from C:\cygwin\bin\cygwin1.dll
[debug]#3 0x61004b5f in cygthread::async_create () from C:\cygwin\bin\cygwin1.dll
[debug]#4 0x7719655b in ?? ()
[debug]#5 0x7717fe1d in ?? ()
[debug]#6 0x77176bc0 in ?? ()
[debug]#7 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
Does anyone know how to fix this? It works perfectly with the same config on my Windows 7 32 bit system though.
-
You try to debug a cygwin based executable by mingw based GDB. This may cause some issue. Can you debug the executable under command line? What is the log message? Why not use the cygwin based GDB?
-
The above issue was related to compiling the code with 32bit g++. When it calls 64bit DLLs causing the above error. After I changed the compiler to 64bit, this issue was disappeared, but I have a new issue:
[debug]Command-line: C:\cygwin64\bin\gdb.exe -nx -fullname -quiet -args C:/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe
[debug]Working dir : C:\Users\layee\Documents\CodeBlocks\SGXData
Starting debugger: C:\cygwin64\bin\gdb.exe -nx -fullname -quiet -args C:/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe
done
[debug]Reading symbols from C:/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
[debug]> break "C:/Users/layee/Documents/CodeBlocks/SGXData/main.cpp:64"
[debug]Breakpoint 2 at 0x401b0b: file C:/Users/layee/Documents/CodeBlocks/SGXData/main.cpp, line 64.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe
[debug]During startup program exited with code 0xc000007b.
Child process PID: 13656
[debug][New Thread 13656.0x2a34]
[debug][New Thread 13656.0xbec]
[debug][New Thread 13656.0x3610]
[debug][New Thread 13656.0x28c4]
[debug][Thread 13656.0x28c4 exited with code 3221225595]
[debug][Thread 13656.0xbec exited with code 3221225595]
[debug]>>>>>>cb_gdb:
During startup program exited with code 0xc000007b.
[debug]> quit
Debugger finished with status 0
Command line debugging with gdb is fine.
C:\Users\layee>C:\cygwin64\bin\gdb.exe -nx -fullname -quiet -args C:/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe
Reading symbols from C:/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe...done.
(gdb) b main.cpp:64
Breakpoint 1 at 0x401b0b: file C:/Users/layee/Documents/CodeBlocks/SGXData/main.cpp, line 64.
(gdb) run
..........
Breakpoint 1, main () at C:/Users/layee/Documents/CodeBlocks/SGXData/main.cpp:64
/home/layee/Documents/CodeBlocks/SGXData/main.cpp:64:1959:beg:0x401b0b
(gdb)
-
Most probably your executable cannot find one of its dependant dlls and fails to load.
-
After I added cygwin64 DLL path to %PATH%, this error is gone. Now it can not open source files:
[debug]> run
[debug]Starting program: /cygdrive/c/Users/layee/Documents/CodeBlocks/SGXData/bin/Debug/SGXData.exe
Child process PID: 896
[debug][New Thread 896.0x2bb8]
[debug][New Thread 896.0x2b60]
[debug][New Thread 896.0x2fe4]
[debug][New Thread 896.0xe50]
[debug]Breakpoint 2, main () at C:/Users/layee/Documents/CodeBlocks/SGXData/main.cpp:64
[debug]||/cygdrive/c/Users/layee/Documents/CodeBlocks/SGXData/main.cpp:64:1959:beg:0x401b0b
[debug]>>>>>>cb_gdb:
Cannot open file: /cygdrive/c/Users/layee/Documents/CodeBlocks/SGXData/main.cpp
At /cygdrive/c/Users/layee/Documents/CodeBlocks/SGXData/main.cpp:64
------------------
Before /cygdrive/c is actually two unprintable hollow bars. I added /cygdrive to cycgdrive prefix in Regsitry, but it doesn't help.
-
Gave up on Cygwin GCC. Revert to default GNU GCC Compiler and default GDB/CDB debugger, then it works.
-
Cannot open file: /cygdrive/c/Users/layee/Documents/CodeBlocks/SGXData/main.cpp
At /cygdrive/c/Users/layee/Documents/CodeBlocks/SGXData/main.cpp:64
For your info:
Codeblocks can obviously not find any files with cygwin paths....
Codeblocks does not know how to handle "/cygdrive/" paths, because it uses the default windows (OS) path structure...
greetings