c - "not stripped"但 "no debug symbols"

标签 c debugging gdb

你能解释一下不同的结果吗:

$ file libc-2.8.so
libc-2.8.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.10, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped

注意最后的“not stripped”。

(gdb) file libc-2.8.so
Reading symbols from /opt/Cross_Tools/powerpc-linux-gnu/powerpc-linux-gnu/libc/lib/libc-2.8.so...(no debugging symbols found)...done.

注意“(未找到调试符号)”

最佳答案

您通常必须在 Debug模式 (-g is the GCC command-line option) 下编译以包含调试符号,它们并不是一直存在直到被删除。默认是在非 Debug模式下构建,没有符号。

关于c - "not stripped"但 "no debug symbols",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21379424/

相关文章:

是否可以使用 gdb 或其他工具来检测复杂程序的某些部分(例如循环),这些部分的目标优化时间比预期的要长?

fortran - 在 gdb 中调用 Fortran 内在函数

在 Makefile 中有条件地定义变量

c - 缩进#define

c - 关于标准中的程序启动

visual-studio-2008 - 调试命令(step over/into)导致未处理的异常

Android:C 中的 usb hid 驱动程序

javascript - 为什么这是 IE11 和 Pale Moon 中的错误?

c - gdb: "Left operand of assignment is not an lvalue."

python - 构建 CPython 时禁用编译器优化