gdb not in executable format: 不可识别的文件格式

This GDB was configured as "i686-linux-gnu".  32位的gdb 系统是64的

sudo apt-get install gdb

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libc6-dbg
建议安装的软件包:
gdb-doc gdbserver
推荐安装的软件包:
libc-dbg
下列软件包将被【卸载】:
gdb:i386
下列【新】软件包将被安装:
gdb libc6-dbg
升级了 0 个软件包,新安装了 2 个软件包,要卸载 1 个软件包,有 0 个软件包未被升级。
需要下载 6,049 kB 的软件包。
解压缩后会消耗掉 24.4 MB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://cn.archive.ubuntu.com/ubuntu/ saucy/main gdb amd64 7.6.1-0ubuntu3 [2,539 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu/ saucy/main libc6-dbg amd64 2.17-93ubuntu4 [3,511 kB]
下载 6,049 kB,耗时 1分 47秒 (56.1 kB/s)
(正在读取数据库 ... 系统当前共安装有 182181 个文件和目录。)
正在卸载 gdb ...
正在处理用于 man-db 的触发器...
Selecting previously unselected package gdb.
(正在读取数据库 ... 系统当前共安装有 182138 个文件和目录。)
正在解压缩 gdb (从 .../gdb_7.6.1-0ubuntu3_amd64.deb) ...
Selecting previously unselected package libc6-dbg:amd64.
正在解压缩 libc6-dbg:amd64 (从 .../libc6-dbg_2.17-93ubuntu4_amd64.deb) ...
正在处理用于 man-db 的触发器...
正在设置 gdb (7.6.1-0ubuntu3) ...
正在设置 libc6-dbg:amd64 (2.17-93ubuntu4) ..

gdb -v
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 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".

重装64位的gdb即可解决

原文地址:https://www.cnblogs.com/leegoo/p/3401057.html