<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite"
cite="mid:mailman.131241.1516114531.1275.llvm-dev@lists.llvm.org">
<pre wrap="">
From: Tim Northover via llvm-dev <a class="moz-txt-link-rfc2396E" href="mailto:llvm-dev@lists.llvm.org" moz-do-not-send="true"><llvm-dev@lists.llvm.org></a>
</pre>
<pre wrap="">Emitting directives in the epilogue is hard because the directives
apply to all instructions after in program-counter order. So if you
have an epilogue in the middle of a function and emit CFI directives
saying the registers are back where they were then the unwinder will
think that applies to the rest of the function too.
To fix that you'd have to emit yet more directives in the basic block
immeditately following the epilogue. Most people don't bother with
either because you'd only really need it if you expected to have to
catch an exception in the epilogue (which is impossible on most
platforms).
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap="">Also, the
directives are also for debug purpose (.debug_frame), right? I guess I only
have to make sure directives work for exception handling, then debug works
as well?
</pre>
</blockquote>
<pre wrap="">Yep. Technically you can stop the debugger in the middle of a prologue
or epilogue, at which point having more fine-grained directives can
help. In practice there's no real reason to do that so people don't
emit directives for it (at least not as a high priority).
Cheers.
Tim.</pre>
</blockquote>
OpenVMS' EH model is for full asynchronous prologue/epilogue EH. We
do more<br>
than just program-level EH, but have to deal with OS events (timers
going off, <br>
asynch I/O completion, mailboxes filled with data, etc.) which could
result in<br>
an unwind occurring. <br>
<br>
We're just about finished with our proposal for extending the x86
compact EH data <br>
format to cover all the cases plus the desire to create the
additional .cfi directives. <br>
Feedback and pointers will be most helpful. Look for this as a new
thread sometime <br>
early next week (we're having our final review on Monday before I
post it).<br>
<br>
John<br>
<blockquote type="cite"
cite="mid:mailman.131241.1516114531.1275.llvm-dev@lists.llvm.org">
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>