This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [basic-improvements] try/finally support for c/c++ - more tests


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]