Location of unwind tables

Christophe de Dinechin ddd at cup.hp.com
Thu Apr 6 22:49:17 UTC 2000


Cary,


An interesting observation was raised at todays C++ ABI meeting. Can we
dynamically generate unwind tables for instance from a JIT? We are back to the
question of whether the IP->UnwindInfo translation can be done just by looking
up tables, or whether we need an API to do it.

I had a discussion with Laurent Morichetti a few minutes ago. It is unclear at
that point whether their unwinding would be based on the unwind library at all
(there are alternatives, such as encoding unwind information themselves). But
assuming they want to leverage all the code that deals with the RSE and all that
magic, they need to have a way to be compatible with the unwind library.

Today, the unwind library uses dlmodinfo to find the start of the code segment
for the current IP (and a predefined symbol in the case of archive-bound
executables). From there, it can find the start of the unwind table, and from
there do a binary search on the IP to find the unwind info block.

The JVM could be compatible with this black magic by having a way to tell dld
what to return for the newly created code segment. I don't think there is a
public dld interface to do that, and it creates a rather obscure and difficult
to document dependency between the JVM, the unwind library and dld.

Alternatively, we could have a couple of APIs to do IP->UnwindInfo translation,
and to register a new range of text and provide the corresponding unwind info
pointer. In that scheme, the actual location of the unwind table would become
irrelevant.

Also note that in addition to Java support, an implementation of Dynamo for IA64
would probably have a similar problem.


What is your opinion?
Christophe




More information about the cxx-abi-dev mailing list