libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] dynamic code support starting to work


From: David Mosberger
Subject: [libunwind] dynamic code support starting to work
Date: Tue, 3 Dec 2002 00:33:25 -0800

I just pushed a largish update into the bitkeeper repository
(http://unwind.bkbits.net/).  The callback API changed fairly
dramatically (acquire_unwind_info/release_unwind_info have been
replaced by a single find_proc_info callback) and I expect that there
are a fairly large number of bugs lurking (and there are so known ugly
warts in src/ia64/tables.c which I plan to get rid of soon).  But it's
there and a simple test program that does (a very simple form of)
dynamic code-generation is working (see tests/test-dyn1.c).

The dynamic unwind info registration API as it would be called by a
dynamic code generator is defined in libunwind-dynamic.h.  I'd be
interested in feedback on this API.  There isn't much in the way of
documentation, so for now it's probably best to take a look at
libunwind-dynamic.h and then at tests/test-dyn1.c to see an example of
how it's being used.  The API has been designed for making it as fast
and as convenient as possible to register unwind info dynamically.
Also, if multiple procedures share the same prologue/epilogue code
(probably fairly common for unoptimized dynamically generated code),
it should be possible to share the underlying data structures.  All
this comes at the expense of making reading this info in the
remote-case somewhat more difficult.  In fact, I haven't even coded
that part yet (however, I was careful to define the data-structures
such that a full-blown interface definition language compiler won't be
needed and expect to fill in the gaps soon...).

I hope this will be the last non-trivial API update.  I expect that
things will have to be refined some more as libunwind gets ported to,
say, x86 and Alpha, but I hope that things are currently general
enough to accommodate most architectures relatively easily.

        --david


reply via email to

[Prev in Thread] Current Thread [Next in Thread]