<br><br><div class="gmail_quote">On Mon, Aug 23, 2010 at 8:57 PM, Jeffrey Yasskin <span dir="ltr"><<a href="mailto:jyasskin@google.com">jyasskin@google.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm not sure processDebugLoc does what you need it to, even with your<br>
changes. It only records an address when the DebugLoc changes, and<br>
that's not guaranteed to happen exactly on the call<br>
MachineInstruction. (Unless you've done something to ensure it does?)<br></blockquote><div><br></div><div>Each call instruction and only call instructions have metadata associated to it. So I am sure emitting the debug location after emitting the call instructions work for my case.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Do you have a unit test that shows this works in all cases?<br></blockquote><div><br></div><div>Not sure about the "all cases", but at least it is working as intended for me and these hooks (emitting before or after) were already present before my changes.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Mapping return addresses to metadata seems like more of a job for the<br>
GC system, but that's not implemented for the JIT, so I can't very<br>
well say to use it instead. :-/<br></blockquote><div><br></div><div>Indeed, doing it in the GC system would also work, but the changes would be way less straightforward than this simple change in the JITemitter. </div></div>
<div><br></div><div>Nicolas</div>