【发布时间】:2012-10-17 03:50:19
【问题描述】:
我想使用gdb 来调试代码。当我写命令时:
gdb gdns_processor
它会输出来自gdb的警告信息:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/gdnscenter/bin/gdns_processor...
warning: the debug information found in "/usr/lib/debug//usr/local/gdnscenter/bin/gdns_processor.debug" does not match "/usr/local/gdnscenter/bin/gdns_processor" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug/usr/local/gdnscenter/bin/gdns_processor.debug" does not match "/usr/local/gdnscenter/bin/gdns_processor" (CRC mismatch).
(no debugging symbols found)...done.
我不明白 CRC 不匹配。为什么gdb 找不到符号?
PS:我的gcc 选项设置了-g 标志。
CPPFLAGS="-D_LIBC_REENTRANT $CPPFLAGS -g"
【问题讨论】:
-
确保包与 debuginfo 包的版本相同。我只是升级我的包。比如说,glibc-debuginfo-common-2.28-39.fc29.x86_64、glibc-debuginfo-2.28-39.fc29.x86_64、glibc-2.28-33.fc29.x86_64、glibc-common-2.28-33.fc29.x86_64。只需
sudo dnf upgrade glibc。