getting the adjusted object pointer
Jason Merrill
jason at redhat.com
Sun Mar 4 17:22:13 UTC 2001
>>>>> "Richard" == Richard Henderson <rth at redhat.com> writes:
> It is clear that the handler should match. It is also clear that a
> pointer adjustment is required in initializing the user variable,
> and that this adjusted pointer can be computed by the personality
> routine.
Yes.
> What is not clear is how to get at this adjusted pointer. If we
> install this adjusted value in gr15, then we pass a effectively
> random value to __cxa_begin_catch, and it becomes very difficult
> to manage the caughtExceptions stack.
Yes, I think we definitely want to pass the unadjusted pointer.
> The most obvious solution is to have __cxa_begin_catch receive the
> unadjusted pointer (at __cxa_exception+1) and return the cached
> adjustedPtr. But in the current documents, __cxa_begin_catch
> returns void.
Your idea would make sense to me. And looking through the discussions, I
see a note from Christophe which contains
LP1:
// Pushes the X on the caught stack
X* xptr = __begin_catch(exc)
so perhaps the documents are just wrong. Christophe?
Jason
More information about the cxx-abi-dev
mailing list