Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Retrieve stack arguments without stackwalk

$
0
0

Suppose main() --> f1(int,int,char) --> f2(int,int,char)-->f3(int,int,char) When in f3()...i get Rsp and Rbp using GetThreadContext...based on this how to get input arguments of all stack frames i.e, f3,f2,f1,main

I don't want to used DBGHELP::stackwalk API

  1. Can i get these arguments using APIs of any other dll apart from dbhelp ?

2.I don't know number of input arguments or number of local variables All i know is Rbp and Rsp Is there a way to determine number of arguments for any given frame ?

  1. I am not able to understand how much offset i should skip either from Rsp or Rbp to reach to arguments

  2. When i compile code with microsoft 'CL' compiler...then Rbp is zero and all access is done with respect to Rsp When i compile code with Intel 'ICL' the all accessing is happening with respect to Rbp when implementing which is better to take as reference Rsp or Rbp ?



Viewing all articles
Browse latest Browse all 15302


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>