非可执行格式:文件格式无法识别 GDB

1 c++ linux ubuntu gdb

我试图用 gdb 调试我的二进制文件(称为 click)。

当我跑

gdb ./click 
Run Code Online (Sandbox Code Playgroud)

我有以下错误

GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
"/home/student/Desktop/./click": not in executable format: File format not recognized 
Run Code Online (Sandbox Code Playgroud)

输出:

uname -a
Run Code Online (Sandbox Code Playgroud)

Linux student 4.2.0-36-lowlatency #42-Ubuntu SMP PREEMPT Thu May 12 23:39:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

如果我跑

file click  
Run Code Online (Sandbox Code Playgroud)

我得到这个输出:

click: ERROR: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2 error reading (Invalid argument)  
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

Emp*_*ian 5

click: ERROR: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2 error reading (Invalid argument)

您的文件只是损坏了。

可能它被截断了(链接它时是否用完了磁盘空间?),或者您以 ASCII 模式从另一台机器通过 FTP 传输它(改用二进制模式)。