Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: i386 on April 04, 2021, 09:24:46 am
-
I found 2 problems:
1) when using "Debug" functions, a dialog box with title "gdborig.exe has stopped working" prompted sometimes. Then the debug session stopped.
2) In the "Debug mode" with default GCC and options, I open watch window and find the pointer's address is NOT 64-bit cononical address format, but a normal 32-bit address such as "0x3131b80". But the built out executable is a 64-bti applicaiton according to the file's attribute info. I think in 64-bit mode, the pointer's address should be "0xFFFFxxxxxxxxxxxx" format.
-
1. The debugger shipped as part of the 20.03 is not very well working. You should find better one. It is best to use 64bit CB to debug 64bit executables. And the debugger exe should also be 64bit.
2. Most probably this is the output from the debugger. Can you enable full logging and check if the values differ?
-
I am using 64-bit win10, and add "-m64" option.
In the code add lines:
unsigned long long ua = (unsigned long long)pt;
printf("ua = 0x%016llx\n", ua);
Then compile(no error and warning) and run:
ua = 0x00000000029924b0
It's just a normal 32-bit address.
1. The debugger shipped as part of the 20.03 is not very well working. You should find better one. It is best to use 64bit CB to debug 64bit executables. And the debugger exe should also be 64bit.
2. Most probably this is the output from the debugger. Can you enable full logging and check if the values differ?
-
I am sorry! The cannonical address form is OK. Because application runs in ring 3, the upper 16bits is always 0x0000H.
Now left questin 1.
-
https://forums.codeblocks.org/index.php/topic,24359.msg166152.html#msg166152
-
I download the 64bit version 'gdb-10.1.90.20201024-x86_64.7z', and extract to codeblocks installation directory. Setup the debugger as the link says.
Then setup a breakpiont and run Debugging...
Starting debugger: C:\Program Files\CodeBlocks\gdb-10.1.90.20201024-x86_64\bin\gdb.exe -nx -fullname -quiet -args D:/devel/cb/vulkan/bin/Debug/vulkan.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (ssbssa-1) 10.1.90.20201024-git
Child process PID: 9436
[Inferior 1 (process 9436) exited normally]
Debugger finished with status 0
----------->
The breakpoint was skipped, and the application 'vulkan' run to the end normally[judging from 'vulkan' app log]. The break point has no effect. I am sure the breakpoint is a VALID point. why?
-
Post the full rebuild and debug logs.
-
I uninstall th CB 20.03. Then re-install it and setup the new gdb as above. After that I find all the debug process is OK.
These are the debug boot up log, the debugger stops at the breakpoint as expected:
---------------------
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\cb\vulkan\
Adding source dir: D:\cb\vulkan\
Adding file: D:\cb\vulkan\bin\Debug\vulkan.exe
Changing directory to: D:/cb/vulkan/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0
Starting debugger: C:\Program Files\CodeBlocks\gdb-10.1.90.20201024-x86_64\bin\gdb.exe -nx -fullname -quiet -args D:/devel/cb/vulkan/bin/Debug/vulkan.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (ssbssa-1) 10.1.90.20201024-git
Child process PID: 8956
At D:\cb\vulkan\entry.cpp:30
-
The uninstall/install cycle doesn't change anything in your settings.
You still don't have a clue where the problem was...
Just a note.
-
@i386 I have just downloaded the https://github.com/ssbssa/gdb/releases/download/gdb-10.2.90.20210425/gdb-10.2.90.20210425-i686.7z file and copied the files over the MING32 installation files.
I was able to set a breakpoint and it stooped on the breakpoint.
I suggest trying the later GDB.