User forums > Using Code::Blocks
Debugging C++ Exceptions does not work
dschornack:
Hello,
I am experiencing a problem debugging C++ Exceptions. From reading through the post, this is an old subject from what I have read and was fixed, but ...
CodeBlocks is not catching C++ Exceptions properly. My Environment is the following ...
Fedora 14 (x86_x64)
Code::Blocks - Aug 30 2010, 10:53:58 - wx2.8.11 (Linux, unicode) - 64 bit
gcc-c++-4.5.1-4.fc14 (x86_64)
gdb-7.2.51.fc14 (x86_64)
and I do have Catch C++ Exceptions turned on in the Debugger Settings
Are there any Debugger initialization commands?
Here is a simple example ...
#include <iostream>
using namespace std;
int main () {
try {
throw 20;
} catch (int e) {
cout << "Just testing ... " << e << endl;
}
return 0;
}
I set the break point on the cout and when the exception is thrown, CodeBlocks appears to hang. If I set my cursor on the cout line and click on "run to cursor", CodeBlocks will stop on the cout line.
I have tried the same code in NetBeans and Netbeans stops on the break point so the problem is not gdb.
Am I missing anything? Is this still a problem with CodeBlocks? I like CodeBlocks and do not want to switch back to Netbeans but ...
Thank you in advance for any help you can provide!
Jenna:
It works here on debian with the debugger-branch, but not with trunk, even if "auto-switch to first frame with valid code" (or however it is called exactly) is set.
Because gdb stops at __cxa_throw in libstdc++.so.6, b ut no source is available.
But I can just click on "next line"and I am on the line with the throw-statement.
Alternatively executing "frame 1" in the command-textctrl in the debugger's log-window switches to the next frame (in this case the frame which has thrown the exception).
dschornack:
Hello Jens,
Can you be more specific as to the debugger-branch? Is it the wxpropgrid_debugger under branches in SVN?
Thanks,
David
Jenna:
--- Quote from: dschornack on August 07, 2011, 07:11:32 pm ---Hello Jens,
Can you be more specific as to the debugger-branch? Is it the wxpropgrid_debugger under branches in SVN?
Thanks,
David
--- End quote ---
Yes !
dschornack:
Hello Jens,
That appears to take care of my problem with C++ Exceptions, however is there an easy way to get back my plugins?
From the Fedora 14 repository, has the following:
codeblocks-10.05
codeblocks-libs-10.05
codeblocks-contrib-10.05 (plugins)
codeblocks-contrib-libs-10.05 (plugins)
I assume the build added codeblocks-10.05 and codeblocks-libs-10.05. From your experience, would it be better to work with
the contrib (plugins) from SVN or from the Fedora repository?
Thanks in advance.
David
Navigation
[0] Message Index
[#] Next page
Go to full version