如何在命令行中使用 Addr2Line
how to use addr2line in commandline
如何使用addr2line?我有一个程序,可以回溯它在崩溃前访问的最后 10 个地址。但是如果我使用这些地址来添加 addr2line 像
addr2line -e test [address]
它只是给了我
??:0
有没有一种特殊的编译方法来编译使用addr2line,就像我们使用ggdb使用GDB一样?
您需要将一些调试信息编译到可执行文件中。
例如$ gcc t.c # debug information not requested
$ gdb ./a.out
...
(gdb) break main
Breakpoint 1 at 0x400588
(gdb) q
$ addr2line -e a.out 0x400588
??:0 # no information returned
$ gcc -g t.c # default debug information requested with -g
$ addr2line -e a.out 0x400588
t.c:4 # line information returnedd
$
相关文章:
- 从命令行c++发送文本文件名
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- 如何在OMNET++中指定与命令行参数组合的输出文件名
- 数组长度,为什么从命令行获取时不能使用它?
- 如何处理linux终端中带有负号(-)的C++中的命令行参数
- VS Code "command":"make"与终端窗口中的命令行"make"不同
- 未定义的引用 .. 使用 OpenCV 编译 C++ 代码时,从命令行
- 通过 Openssl 命令行加密,通过 c++ 解密
- CMake "--target install"无需"--build"命令行
- 更改命令行 qt5 源代码构建配置的正确/快速方法
- 使用 C++ 将命令行参数拆分为参数/向量
- 用于解析 win64 堆栈跟踪的命令行客户端(可以访问符号服务器)
- LLVM | codegen 用于带有命令行选项的程序输入功能
- 如何在OMNET++中添加专门的命令行参数?
- Makefile g++ 使用命令行中的 -D 变量进行编译,默认值
- 在命令行中创建快捷命令
- 在命令行上将输入显示到数组中时如何删除 ./a.out?
- C++命令行提示符不应重复
- 如何在不传递命令行参数的情况下在 c++ 中设置环境变量
- 如何在命令行中使用 Addr2Line