gpt4 book ai didi

c++ - 如何在不使用 dbghelp.dll 的情况下在 Windows 上获取堆栈跟踪?

转载 作者:可可西里 更新时间:2023-11-01 18:26:05 35 4
gpt4 key购买 nike

如何在不使用 dbghelp.dll 的情况下在 Windows 上获取地址堆栈跟踪?

我不需要知道与地址关联的符号或函数名是什么,我只需要地址列表 -- 类似于 backtrace of *nix systems 的内容

谢谢!

最佳答案

查看 CaptureStackBackTrace()函数,它在 Kernel32.dll 中。这应该可以满足您的所有需求。

Captures a stack back trace by walking up the stack and recording the information for each frame.

USHORT WINAPI CaptureStackBackTrace(
__in ULONG FramesToSkip,
__in ULONG FramesToCapture,
__out PVOID *BackTrace,
__out_opt PULONG BackTraceHash
);

关于c++ - 如何在不使用 dbghelp.dll 的情况下在 Windows 上获取堆栈跟踪?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/392327/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com