User forums > Using Code::Blocks
Boost assertions closes the debugger
zabzonk:
> BTW there are no signals on windows, as far as I know.
http://msdn.microsoft.com/en-us/library/xdkz3x12%28v=vs.71%29.aspx
Despite what the "Visual Studio .NET 2003" header implies, the text makes it clear that signals have always been a part of Windows.
ThundThund:
What about this?
http://stackoverflow.com/questions/1721543/continue-to-debug-after-failed-assertion-on-linux-c-c
They use SIGTRAP or Int 3.
I'm now at work, I'll try to use it this afternoon.
zabzonk:
Interesting. This code:
--- Code: ---#include <iostream>
using namespace std;
void f() {
asm( "int $3" );
}
void g() {
f();
}
int main() {
cout << "hello world\n";
g();
cout << "hello again\n";
}
--- End code ---
Does indeed cause a break in the debugger and displays the correct stack frames. It also allows continuation after the interrupt. Windows does not support SIGTRAP, so you would be limited to using the non-portable asm(). You would also have to modify the BOOST_ASSERT code too.
Navigation
[0] Message Index
[*] Previous page
Go to full version