"Trass3r" wrote in message news:[email protected]...
So you can't even do something like
extern extern (C) __gshared bool rt_trapExceptions;
void main()
{
rt_trapExceptions = false;
asm { int 3; }
}
No, because rt_trapExceptions is checked before main is called, something
like this:
int tryMain()
{
void runMainAndStuff()
{
runModuleConstructors();
main();
}
if (rt_trapExceptions)
{
try { runMainAndStuff(); } catch { ... }
}
else
runMainAndStuff();
}
It might be possible to _replace_ the variable using some linker magic but I
haven't managed to do that successfully.