This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Well, there is no exception handling in the generated machine code, and we want not to have any exception handling but to let the C++ exception handling PASS THROUGH our stack frames to find its eventual catch. This means that we have to give the run time function that implements the throw some way of getting into the higher up frames without crashing. The problem is that any throw that encounters intermediate assembler frames will inevitably CRASH."jacob" == jacob navia <jacob@jacob.remcomp.fr> writes:
jacob> This application generates dynamically code and executes it, using a jacob> JIT, a Just In time Compiler. Everything is working OK until the C++ jacob> code generates a throw.
Fun!
I looked at this a little bit with libgcj.
In some ways for libgcj it is simpler than it is for C++, since in the
gcj context we know that the only objects thrown will be pointers.
So, if we were so inclined, we could give the JIT its own exception
handling approach and have little trampoline functions to handle the
boundary cases.
Unfortunately things are also worse for libgcj, in that we need to be
able to generate stack traces as well, and the trampoline function
approach won't work there.
Very interesting but maybe you could be more specific?Still, if you know something about the uses of 'throw' in your program, maybe this would work for you.
Longer term, yeah, gcc's unwinder needs a JIT API, and then the
various JITs need to be updated to use it. At least LLVM appears to
be headed this direction.
Tomjacob
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |