今天为调试一段代码,使用gcc将程序用-g选项重新编译。但是使用gdb进行debug时,仍然出现“no debug symbols found”的错误。仔细检查了一下Makefile,原来后面定义的连接选项中指定了-s。gcc的文档中说明如下:

 

-sRemove all symbol table and relocation information from the executable.

去掉-s后,可以用gdb进行调试了

 

 

 

 

今天为调试一段代码,使用gcc将程序用-g选项重新编译。但是使用gdb进行debug时,仍然出现“no debug symbols found”的错误。仔细检查了一下Makefile,原来后面定义的连接选项中指定了-s。gcc的文档中说明如下:

 

-sRemove all symbol table and relocation information from the executable.

去掉-s后,可以用gdb进行调试了

 

 

 

 

相关文章:

  • 2021-12-20
  • 2021-09-06
  • 2022-03-04
  • 2021-12-16
  • 2021-09-12
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2021-11-02
  • 2021-09-03
  • 2021-10-06
  • 2021-07-08
  • 2022-12-23
  • 2021-09-15
相关资源
相似解决方案