How to obtain the native stacktrace from native exceptions caught in managed code

后端 未结 2 555
情书的邮戳
情书的邮戳 2021-01-18 17:54

I have some managed code that calls to a method inside some native DLL(i have the appropriate symbol files).
Sometimes, that native method throws an exception which I ca

2条回答
  •  清歌不尽
    2021-01-18 18:48

    Obtaining a native stack trace is quite difficult. By the time it passes through the .NET/native translation layer, the native stack trace has already been lost.

    So, you need to capture it while still in native code, and this is also quite difficult. Take a look at John Robbins' work for proper native stack tracing; the latest publicly-available version of his SUPERASSERT that I could find is from MSJ, Feb 1999.

提交回复
热议问题