<div dir="ltr">Yeah, unfortunately I really know nothing about the CFI side of DWARF... - I'd throw such things in Peter's direction (but maybe that's just me confusing the different uses of the CFI acronym... ).</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 6, 2017 at 10:18 PM Dean Michael Berris via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dberris added a reviewer: dblaikie.<br>
dberris added a subscriber: dblaikie.<br>
dberris added a comment.<br>
<br>
Adding @dblaikie to the review for the CFI directives (please feel free to nominate someone else who might know better).<br>
<br>
The problem I'm having in particular here is the computation in the `ALIGNED_CALL_RAX` macro, where we're doing stack re-alignment just before the call to the custom event handler function (line 77). Working offline with a teammate here in Sydney, we're prototyping some potential ways of doing this correctly but using `.cfi_escape ...` and providing raw DWARF opcodes. Ideally I wouldn't have to go through such lengths, but without the correct CFI directives and/or DWARF information, debugging XRay instrumentation handlers and the trampolines becomes really hard (since the CFI directives would probably be wrong).<br>
<br>
Before I go uploading a work-in-progress implementation here, is there an example somewhere of how to potentially resolve this in assembler?<br>
<br>
One sticking point is the fact that there seems to be no way to get the current CFI offset from the assembler using either a directive or a special macro -- at least not one I can find from the assembler manuals.<br>
<br>
Pointers would be most appreciated.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D40894" rel="noreferrer" target="_blank">https://reviews.llvm.org/D40894</a><br>
<br>
<br>
<br>
</blockquote></div>