This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [basic-improvements] try/finally support for c/c++ - more tests
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "zack at codesourcery dot com" <zack at codesourcery dot com>, "jakub at redhat dot com" <jakub at redhat dot com>, "aldyh at redhat dot com" <aldyh at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "jason at redhat dot com" <jason at redhat dot com>
- Date: 07 Nov 2002 15:13:58 -0800
- Subject: Re: [basic-improvements] try/finally support for c/c++ - more tests
- References: <20021107223902.GA26257@redhat.com><118010000.1036709447@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> --On Thursday, November 07, 2002 02:39:02 PM -0800 Richard Henderson
> <rth@redhat.com> wrote:
> > How, exactly, do you do that without having C use EH? Or,
> > more specifically, how do you interleave the C stack and
> > the C++ EH?
>
> When in C code, and you hit pthread_cleanup_push, call into the runtime
> passing the address of the start and end of the function you're in, and
> the frame pointer. When unwinding, notice that you're in that PC range
> with that frame pointer, and run the cleanups that correspond to that
> range. You're guaranteed to be getting these in the right order; as
> you unwind you'll always be pulling stuff off the front of the list.
Wouldn't that:
(a) slow down normal C++ unwinding, because you have to keep looking
for runtime-installed cleanups? and
(b) still require unwinding data for the C code?
--
- Geoffrey Keating <geoffk@geoffk.org>