This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dynamically generated code and DWARF exception handling
- From: Mike Stump <mrs at apple dot com>
- To: jacob navia <jacob at jacob dot remcomp dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 2 May 2006 19:21:24 -0700
- Subject: Re: Dynamically generated code and DWARF exception handling
- References: <4457414C.2010404@jacob.remcomp.fr>
On May 2, 2006, at 4:23 AM, jacob navia wrote:
To get to the corresponding catch, the runtime should skip through
the intermediate frames in assembler generated by the JIT. We would
like to know how should be the interface with gcc to do this.
The C++ abi spec and dwarf specs are good background reading materials.
We thought for a moment that using sjlj_exceptions it would work,
but we fear that this is no longer being maintained.
While one could do that, I'd recommend just doing up the dwarf style
EH information for the JIT code.
1) Is this true?
Not exactly.
2) Can we use sjlj exception under linux safely?
I'd expect so. Though, you have to understand this this would mean
that you'd have to recompile all the code on the system, possibly
including the C library, gcc and the like, as well as application
code and library code. When faced with that, you might determine it
is impossible.
Otherwise, would it be possible to generate the DWARF Tables and
add those tables dynamically to the running program?
Yes (could require OS changes).
Under windows, Microsoft provides an API for JITs that does exactly
that. Is there an equivalent API for linux?
Don't think so.