5

Is it possible to make StackWalk64 load and use a RUNTIME_FUNCTION table extracted by me?
The only way I found out is loading it using SymLoadModule64 when it is used, it is very slow.

I also saw that StackWalk64 can receive a function that will give it the appropriate RUNTIME_FUNCTION entry each time, but it would require me to implement the x64 UNWINDING algorithm which is partly undocumented.

Is it possible to do so using RtlInstallFunctionTableCallback or RtlAddFunctionTable? Are they related to StackWalk64?
And if so, how? I couldn't find examples for this.

Idov
  • 5,006
  • 17
  • 69
  • 106
  • Upvote for this because I couldn't ever figure it out either. If you want to use DbgEng, and have registered a custom function table callback (via the methods you mentioned), you can use IDebugControl4::GetContextStackTrace to get the full stack. I had a similar question here http://stackoverflow.com/questions/5653719/how-do-you-walk-a-mixed-mode-managednative-stack-with-dbghelpstackwalk64 – Steve Dec 28 '13 at 22:55
  • I'm not sure what you mean by 'extracted by me'. Using RtlAddFunctionTable you can add RUNTIME_FUNCTION dynamically, and I think it should be picked up by StackWalk64 (I have not tried). A sample demonstrating exception handling with RtlAddFunctionTable is at https://pmeerw.net/blog/programming/RtlAddFunctionTable.html. – pmeerw Oct 03 '19 at 22:27

0 Answers0