2c教程网大并发服务器开发价值280元课件库源码分析三.pptxVIP

  • 2
  • 0
  • 约小于1千字
  • 约 3页
  • 2022-06-15 发布于北京
  • 举报

2c教程网大并发服务器开发价值280元课件库源码分析三.pptx

muduo_base库源码分析 第十二章 1 本章目标 Exception类实现 backtrace,栈回溯,保存各个栈帧的地址 backtrace_symbols,根据地址,转成相应的函数符号 abi::__cxa_demangle 2 abi::__cxa_demangle 3 string Exception::demangle(const char* symbol) { size_t size; int status; char temp[128]; char* demangled; //first, try to demangle a c++ name if (1 == sscanf(symbol, %*[^(]%*[^_]%127[^)+], temp)) { if (NULL != (demangled = abi::__cxa_demangle(temp, NULL, size, status))) { string result(demangled); free(demangled); return result; } } //if that didnt work, try to get a regular c symbol if (1 == sscanf(symbol, %1

文档评论(0)

1亿VIP精品文档

相关文档