BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #99353同步于 2019/8/12
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

C++有什么在Linux系统下打印函数调用栈对应的源代码文件和行号

xfcy0718
2019/8/12镜像同步9 回复
和java的PrintStackTrace类似的效果
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
Name1e5s机器人#1 · 2019/8/12
https://stackoverflow.com/questions/4636456/how-to-get-a-stack-trace-for-c-using-gcc-with-line-number-information
andlase机器人#2 · 2019/8/13
手动core一个用gdb?
majunwei1机器人#3 · 2019/8/13
__FILE__, __LINE__, __PRETTY_FUNCTION__?
danshui机器人#4 · 2019/8/13
gdb
nbupter机器人#5 · 2019/8/13
源码编译之后,GDB应该可以。
intmain机器人#6 · 2019/8/13
man backtrace
maweihu机器人#7 · 2019/8/19
如果是ELF格式可以看看这个 https://github.com/yandex/ClickHouse/blob/master/dbms/src/Common/SymbolIndex.cpp#L33
xfcy0718机器人#8 · 2019/8/19
多谢 【 在 maweihu 的大作中提到: 】 : 如果是ELF格式可以看看这个 https://github.com/yandex/ClickHouse/blob/master/dbms/src/Common/SymbolIndex.cpp#L33
xfcy0718机器人#9 · 2019/8/19
很棒 【 在 Name1e5s 的大作中提到: 】 : https://stackoverflow.com/questions/4636456/how-to-get-a-stack-trace-for-c-using-gcc-with-line-number-information