C++ 崩溃调用栈打印二

cpp 复制代码
#define ORYOL_WINDOWS   1

#include "callstack/StackWalker.h"
#include "callstack/StackTrace.h"
#include "callstack/StackWalker.cc"
#include "callstack/StackTrace.cc"


void func() {
    char callstack[4096];
    Oryol::StackTrace::Dump(callstack, sizeof(callstack));
}

void test() {
    func();
}

输出

SymInit: Symbol-SearchPath: '.', symOptions: 530, UserName: 'admin'

OS-Version: 6.2.9200 () 0x100-0x1

D:\workspace\test\out\build\debug\test.exe:test.exe (00007FF668C60000), size: 884736 (result: 0), SymType: 'PDB', PDB: '.\test.pdb'

C:\Windows\SYSTEM32\ntdll.dll:ntdll.dll (00007FFD18170000), size: 2064384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\ntdll.dll'

C:\Windows\System32\KERNEL32.DLL:KERNEL32.DLL (00007FFD17110000), size: 782336 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\KERNEL32.DLL'

C:\Windows\System32\KERNELBASE.dll:KERNELBASE.dll (00007FFD15AF0000), size: 2957312 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\KERNELBASE.dll'

C:\Windows\System32\SHLWAPI.dll:SHLWAPI.dll (00007FFD18000000), size: 348160 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\SHLWAPI.dll'

C:\Windows\System32\msvcrt.dll:msvcrt.dll (00007FFD164D0000), size: 647168 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\msvcrt.dll'

C:\Windows\System32\ADVAPI32.dll:ADVAPI32.dll (00007FFD18080000), size: 712704 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\ADVAPI32.dll'

C:\Windows\System32\sechost.dll:sechost.dll (00007FFD17010000), size: 638976 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\sechost.dll'

C:\Windows\System32\RPCRT4.dll:RPCRT4.dll (00007FFD17C10000), size: 1200128 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\RPCRT4.dll'

C:\Windows\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (00007FFD15A30000), size: 532480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\bcryptPrimitives.dll'

C:\Windows\SYSTEM32\RTWorkQ.DLL:RTWorkQ.DLL (00007FFD01970000), size: 212992 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\RTWorkQ.DLL'

C:\Windows\SYSTEM32\UMPDC.dll:UMPDC.dll (00007FFD14CA0000), size: 73728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\UMPDC.dll'

C:\Windows\System32\QIPCAP64.dll:QIPCAP64.dll (0000000068000000), size: 466944 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Windows\System32\QIPCAP64.dll'

C:\Windows\SYSTEM32\DNSAPI.dll:DNSAPI.dll (00007FFD14D10000), size: 827392 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\DNSAPI.dll'

C:\Windows\SYSTEM32\IPHLPAPI.DLL:IPHLPAPI.DLL (00007FFD14CC0000), size: 241664 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\IPHLPAPI.DLL'

C:\Windows\System32\NSI.dll:NSI.dll (00007FFD16E70000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\NSI.dll'

C:\Windows\SYSTEM32\dbghelp.dll:dbghelp.dll (00007FFD0E350000), size: 1982464 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\dbghelp.dll'

C:\Windows\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FFD15750000), size: 204800 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\SspiCli.dll'

D:\workspace\test\callstack\StackWalker.cc (1048): StackWalker::ShowCallstack

D:\workspace\test\callstack\StackTrace.cc (101): Oryol::StackTrace::Dump

D:\workspace\test\main_callstack2.cpp (11): func

D:\workspace\test\main_callstack2.cpp (15): test

D:\workspace\test\main.cpp (40): main

D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (79): invoke_main

D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh

D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (331): __scrt_common_main

D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp (17): mainCRTStartup

ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFD17127614)

00007FFD17127614 (KERNEL32): (filename not available): BaseThreadInitThunk

ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFD181C26A1)

00007FFD181C26A1 (ntdll): (filename not available): RtlUserThreadStart

C++ 崩溃调用栈打印_崩溃时堆栈打印-CSDN博客


创作不易,小小的支持一下吧!

相关推荐
Trouvaille ~5 分钟前
【C++篇】C++类与对象深度解析(四):初始化列表、类型转换与static成员详解
c++·类型转换·类和对象·面向对象编程·static·初始化列表·开发者指南
疑惑的杰瑞5 分钟前
[C语言]连子棋游戏
c语言·开发语言·游戏
wrx繁星点点5 分钟前
创建型模式-单例模式
java·开发语言·单例模式
杨~friendship21 分钟前
Ubuntu上使用qt和opencv显示图像
linux·开发语言·c++·qt·opencv·ubuntu
街 三 仔25 分钟前
【C语言零基础入门篇 - 3】:格式化输入输出、字符操作和sizeof运算符揭秘
c语言·开发语言
CS小麻瓜33 分钟前
Web植物管理系统-下位机部分
c++·嵌入式硬件·湖南大学
喜欢猪猪40 分钟前
TCP/IP网络编程概念及Java实现TCP/IP通讯Demo
开发语言·php
UvwxyZ6661 小时前
python日志记录与命令行交互
开发语言·python
解孔明1 小时前
IDEA2023.1添加java虚拟机启动参数,打开断言
java·开发语言
关关不烦恼1 小时前
【Java数据结构】二叉树
java·开发语言·数据结构