C++ 使用GCC4.9.2编译时出现“非可执行格式”的奇怪错误

C++ 使用GCC4.9.2编译时出现“非可执行格式”的奇怪错误,c++,c,linux,gcc,gdb,C++,C,Linux,Gcc,Gdb,当使用gcc4.9.2编译应用程序时,我在尝试使用gdb进行调试时遇到一个奇怪的错误。虽然我可以运行可执行文件OK: $./simapp --help Checking for design variables is enabled. Quick simplification of expressions is enabled. In expressions, the replacement of references by their values is enabled. U

当使用gcc4.9.2编译应用程序时,我在尝试使用gdb进行调试时遇到一个奇怪的错误。虽然我可以运行可执行文件OK:

$./simapp --help

Checking for design variables is enabled.
Quick simplification of expressions is enabled.    
In expressions, the replacement of references by their values is enabled.    
Usage: simapp [options] [-r rawfile] [inputfile]

Options:
    -h             List devices and analyses.
    .............................
但是,试图通过gdb运行时会出现一个错误,即无法以可执行格式运行。。。为什么?

$gdb simapp
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.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/>...
"/home/build/64bitdebug/bin/simapp": not in executable format: File format not recognized
(gdb)

编辑说明:我意识到这个可执行文件是~800MB;可执行文件是否有某种大小限制

你应该升级你的电脑。它的当前版本是7.8.2,最近的gcc想要最新的gdb您试过gdb./simapp了吗?什么是文件的输出?/SIMAPP?我同意巴齐尔——GDB不理解所有的可执行文件,而新的GDB会解决这个问题。但是,这确实是个好主意:GNU GDB GDB 7.82.版权C 2014免费软件基金会。这个GDB被配置为X86Y64-UnNeN-LIUX-GNU。键入show configuration以获取配置详细信息。要获得帮助,请键入help。键入apropos word以搜索与word相关的命令。。。opt/path/bin/simapp:非可执行格式:文件格式不可识别gdb注意:我意识到该可执行文件约为800MB;是否有大小限制?file./simapp有问题:$file./simapp./simapp:ELF 64位LSB可执行文件,x86-64,版本1 SYSV,对于GNU/Linux 2.6.9,动态链接使用共享libs,剥离$file./simgui./simgui:ELF 64位LSB可执行文件,x86-64,版本1 SYSV,动态链接使用共享libs,对于GNU/Linux 2.6.9,未剥离
libstdc++.so.6 => /opt/gcc/4.9.2_rebld/lib64/libstdc++.so.6 (0x00007f4c8f119000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003e9c200000)
        libgcc_s.so.1 => /opt/gcc/4.9.2_rebld/lib64/libgcc_s.so.1 (0x00007f4c8ef02000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003e9be00000)