使用本机c++运行.NET调用堆栈

时间:2022-09-01 23:21:52

Is there a way to walk a .NET callstack using native c++?
I read the dbgHelp only handles native frames.
Also, I tried finding information about how the .NET callstack is built but didn't find anything.
Does anybody know a link for this?

是否有一种方法可以使用本机c++运行。net调用堆栈?我读过dbgHelp只处理本地帧。此外,我还尝试查找关于. net调用堆栈如何构建的信息,但没有找到任何信息。有人知道这个的链接吗?

1 个解决方案

#1


1  

DbgHelp only handles native frames, but the Managed Debugging API is actually a native API (naturally, since you can't use managed code to debug when the managed runtime is stopped at a breakpoint).

DbgHelp只处理本地帧,但是托管调试API实际上是一个本地API(当然,因为当托管运行时在断点处停止时,您不能使用托管代码进行调试)。

And here's a sample.

这是一个示例。

Of particular interest will be the ICorDebugStackWalk interface.

特别有趣的是ICorDebugStackWalk接口。

#1


1  

DbgHelp only handles native frames, but the Managed Debugging API is actually a native API (naturally, since you can't use managed code to debug when the managed runtime is stopped at a breakpoint).

DbgHelp只处理本地帧,但是托管调试API实际上是一个本地API(当然,因为当托管运行时在断点处停止时,您不能使用托管代码进行调试)。

And here's a sample.

这是一个示例。

Of particular interest will be the ICorDebugStackWalk interface.

特别有趣的是ICorDebugStackWalk接口。