title: Getting the caller's Return Address
body: <p>I am trying to figure out how to grab the return address of a caller in MSVC. I can use _ReturnAddress() to get the return address of my function, but I can't seem to find a way to get the caller's. </p>
  
  <p>I've tried using CaptureStackBackTrace, but for some reason, it crashes after many, many calls. I would also prefer a solution via inline assembly. </p>
  
  <pre class="lang-c prettyprint-override"><code>void my_function(){
      cout &lt;&lt; "return address of caller_function: " &lt;&lt; [GET CALLER'S RETURN VALUE];
  } // imaginary return address: 0x15AF7C0
  
  void caller_function(){
       my_function();
  }// imaginary return address: 0x15AFA70
  </code></pre>
  
  <p>Output:
  <code>return address of caller_function: 0x15AFA70</code></p>