gdb调试任何C语言代码都报错:not in executable format: File format not recognized

gdb调试任何C语言代码都无法识别

GNU gdb (GDB) Red Hat Enterprise Linux (7.2-90.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
(gdb) file ./main.cc
"/backup/workspace/mysql-5.7.25/sql/main.cc": not in executable format: File format not recognized
(gdb)

1个回答

hu_wen_wei
wayne.hu 谢谢大哥的回答,不过我这是通过反向导入的mysql源码工程,不是自己从头新建工程开发的C程序,这个源码我从来没有改过应该不会有这种错误的~
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问