tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/lib/libunwind
Joerg, I still think this "import" was a bad engineering decision and should
be backed out, followed by a proposal, discussion and then re-import in
modified form.
First: it is all fine for /usr/src/lib/*, if you need it in userland for
clang, it could live there (unmodified) for now.
But for kernel, I think a better design is needed.
Here is a quick sketch of how I would start looking at a design:
Goal: use libunwind mostly as-is to provide the C++ ABI for exception
handling and unwind operations (joerg's pointer to the Itanium
documents). Share parts of this with the kernel, so the unwind info can
be used e.g. inside ddb.
The shared-with-kernel part should be written in plain C, and use
abstractions already present in our code - see <arch/mcontext.h>, use
__gregset_t, _NGREG32, _REG_PC and friends. If this part needs MD code,
the already present kernel functions should be used so for the kernel
part no additional MD work is needed.
This means re-implementing (or "porting") the DWARF parser in C, plus a
bit of glue. The userland C++ code can reuse this, with maybe a few
helper functions needed. The interface of the share part should be
separately documented (as there is no use for the C++ unwind/exception
ABI inside the kernel).
Martin
Home |
Main Index |
Thread Index |
Old Index