gdb can not find debug info on Centos

前端 未结 1 486
野的像风
野的像风 2021-01-23 15:44

I am trying to figure out a very strange issue. I have CentOS 6.5 system with gdb:

GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)

相关标签:
1条回答
  • 2021-01-23 16:27

    Your GDB is pretty old. Your GCC is fairly new.

    I suspect that your GCC is emitting DWARF4 debug info (default as of gcc-4.8 according to release notes), which your GDB does not recognize.

    Do you get better result with -gdwarf-2 instead of -g?

    If so, upgrade your GDB or use -gdwarf-2 with this compiler.

    0 讨论(0)
提交回复
热议问题