User forums > Using Code::Blocks
Help debugging with GDB...
PaulR:
Hi
I am building an existing C + C++ project via shell scripts in MSYS2 and attempting to debug using Code::Blocks (svn 11313).
* Code::Blocks is successfully executing the resultant exe (which works along with several .dlls, all built with a debug config).
* GDB is successfully attaching to the process. There are no warnings about symbols not being found and I am able to pause and continue execution.
However, when I pause and continue I get the following message:
--- Code: ---Trying to interrupt process with pid: 1488; child pid: 1488 gdb pid: 6664
In ?? () ()
Continuing...
--- End code ---
... and the call stack is empty too with ?? 0 as the current function.
In the C::B project I have added all header and source files from the exe source and the dll sources. I have added the Qt include path to the "Additional debugger search directories" too, since it uses that.
Could somebody please explain the schoolboy error I am making here?
Thanks in advance for any assistance.
oBFusCATed:
1. Make sure you're not stripping symbols.
2. Make sure you're able to debug simple hello world type of application
3. When paused execute the "info shared" command and see if all modules have symbols.
PaulR:
Thanks very much for the reply.
1: I'll check the build scripts for this.
2: Yes, everything is fine with debugging (breakpoints/call stack)
3: The modules I am interested in changing code for all have read symbols (no [ * ] next to them).
I checked "Debug->Information->Targets and files" and for the local exec file, there is a long list of addresses in the results - including the entry point and the modules checked in #3, so this probably indicates something is wrong with that file too I assume.
PaulR:
Hmm, it looks like I need to make a full Qt debug build to get some files to make the exe build correctly in debug. I'm not interested in debugging the main exe though, just the code for a few of the dlls. Is this possible?
oBFusCATed:
Yes, it should be possible to debug if you have symbols only for part of your app. Keep in mind that mixing dlls compiled with vc++ and mingw doesn't work well, because gdb doesn't know how to read the symbols produced by vc++.
Navigation
[0] Message Index
[#] Next page
Go to full version