This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Exception handling HowTO??
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Jan Hoogerbrugge <hoogerbrugge at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 29 Mar 2004 15:58:24 -0800
- Subject: Re: Exception handling HowTO??
- References: <BAY9-F63aNnhux9ADpJ00011bcc@hotmail.com>
Jan Hoogerbrugge wrote:
I can use some advice to implement exception handing for my target port.
I doubt that we have a HowTO anywhere.
The simple way is to just builtin setjmp/longjmp style EH. You
probabbly don't need much if builtin setjmp/longjmp already work. The
efficient way is to use DWARF2 CFI style unwinding. For this, you will
need to do quite a bit of work.
See the "Exception Handling" node of the gcc docs for some of the macros
that need to be defined to make DWARF2 style unwinding work.
You will have to define DWARF2 CFI support for your target, and
implement it. You will have to modify the prologue support to emit
DWARF2 CFI info, which is usually done by marking insns with
RTX_FRAME_RELATED_P, and then letting machine independent code handle
the rest. You may have to do some of this in machine dependent code.
See the docs for DWRAF2_DEBUGGING_INFO.
In general, searching the gcc docs for "exception" and "dwarf2" should
turn up useful info scattered around the gcc docs.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com