[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]

Mark Shannon
Mon, 20 Jul 2009 16:48:57 -0000

Duncan Sands wrote:
> Hi Mark,
Hi Duncan,
>
>> You are confusing stopping the unwinding at *some* levels or at *all*
>> levels.
>> Eg.
>> invoke
>>   call
>>    call
>>     invoke
>>      call
>>       call
>>        unwind
>
> the dwarf unwinder only stops and runs user code at the invokes.
> It does restore registers and so forth at every stack frame.
> This is extra work done at unwind time that reduces the cost of
> making invoke calls by avoiding the need to save a bunch of
> context.
Thanks for the informative answer.

So who is responsible for (as stated under the invoke description in the
language reference) "ensure that proper cleanup is performed in the case
of either a longjmp or a thrown exception"?

Is it entirely the front-end or is dwarf unwinding doing some extra work
(other than a few unecessary register restores), like restoring signals,
and calling pthread cleanup routines?

In other words does the dwarf unwinder do nothing other than unwind,
and was all that stuff about pthread_cleanup_pop() actions just a
red-herring?

Mark.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>