This is the mail archive of the
mailing list for the GCC project.
Re: Dynamically generated code and DWARF exception handling
- From: Tom Tromey <tromey at redhat dot com>
- To: jacob navia <jacob at jacob dot remcomp dot fr>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: 03 May 2006 13:03:13 -0600
- Subject: Re: Dynamically generated code and DWARF exception handling
- References: <4457414C.firstname.lastname@example.org>
- Reply-to: tromey at redhat dot com
>>>>> "jacob" == jacob navia <email@example.com> 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
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.