<div dir="ltr"><div>Hi all,</div><div><br></div><div>Let's say I have an example like this</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><i>fn foo() {<br>     heapRef2 = getHeapRef()<br>     readStackMap()<br>}<br>fn main() {<br>    heapRef1 = getHeapRef()<br>    foo();<br>}</i></blockquote><div><br></div><div>When we start to read stack map in foo(), our stack has two heap references (heapRef1 and heapRef2). From the LLVM stack map we can get the location of <b>heapRef2</b>, using let's say rsp + offset. </div><div><br></div><div>But, When we consider about <b>heapRef1, </b>its' offset is given with respect to its' function(main) rsp or rbp.<b> </b>But at this moment those registers are pointed to foo()'s stack frame locations. There fore how do we get the location of <b>heapRef1?</b></div><div><br></div><div>Highly appreciate your input on this.</div><div><br></div><div>Thank you,</div><div>Kavindu</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Kavindu Gimhan Zoysa,</div><div>BSc(Hons) | ENTC | UoM,<br></div><div dir="ltr">SSE | WSO2<div><br></div><div><a href="https://github.com/KavinduZoysa" target="_blank">GitHub</a> <a href="https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/" target="_blank">LinkedIn</a> <a href="https://medium.com/@kavindugimhanzoysa" target="_blank">Medium</a></div></div></div></div></div></div></div></div></div>