This is the mail archive of the 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]

Re: Dynamically generated code and DWARF exception handling

>>>>> "jacob" == jacob navia <> 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.


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.

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]