patch to support libunwind-based exception handling
David Mosberger
davidm@hpl.hp.com
Fri Feb 15 17:56:00 GMT 2002
Attached below is a small patch against gcc3.1 which makes it possible
to build a version of GCC that uses libunwind as the basis for
exception handling (see
http://www.hpl.hp.com/hosted/linux/mail-archives/libunwind/ for more
discussions on libunwind).
To use this patch, you first need to install libunwind, which is
available at:
ftp://ftp.hpl.hp.com/pub/linux-ia64/libunwind-0.1.tar.gz
This library is still under development and currently limited to ia64
linux, though eventually the goal is to have it work for several other
platforms.
Once libunwind is installed and the patches below applied, you need to
rerun autoconfig. Afterwards, configure option
"--enable-libunwind-exceptions" can be used to request GCC to be built
with the libunwind library. If everything goes well, GCC should build
as usual and libunwind should be used without any additional work. To
verify that you linked against libunwind, you can run "nm" on a C++
program and you should see several symbols starting with _U_. For
example:
4000000000006a90 T _U_ia64_get_frame_state
400000000000c830 T _U_ia64_get_proc_info
Some caveats: this stuff is not ready for prime-time yet, but I am
interested in any and all feedback from the GCC community. In
particular, I don't really understand all the issues that are involved
in making libgcc depend on another system library (libunwind). In the
patch below, you'll see that I made some changes to gcc.c. I suspect
the changes are quite wrong but I'm not sure what's the right way to
do this. Also, currently libunwind is available only as a static
library, but eventually, it will be a shared library. Are there any
issues here that I should be aware of? Note that part of the reason
I'm working on libunwind is so that different compilers and
applications can share the same basic unwind code, so it would be
really nice if libunwind could be a separate shared library.
Thanks,
--david
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppp
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20020215/61654446/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20020215/61654446/attachment-0001.ksh>
More information about the Gcc
mailing list