我在Ubuntu 12.04(64位)上安装了一个程序(不是shell脚本),它运行正常,但是,当我使用gdb附加到该程序时,出现了消息文件格式无法识别 这很令人困惑。 知道为什么吗? 谢谢。

# gdb -p 25016
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>.
Attaching to process 25016
"/home/test/engine": not in executable format: **File format not recognized**


# file /home/test/engine
engine: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped
# which gdb
/usr/bin/gdb
# file /usr/bin/gdb
/usr/bin/gdb: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x8cd6c593fd6ffe6fd72266bf3d3407ea599b8143, stripped
root@jin1-HP:~/projs/jsStress_compile

===============>>#1 票数:1

GNU gdb(Ubuntu / Linaro 7.4-2012.04-0ubuntu2.1)7.4-2012.04

该GDB相当旧(当前的GDB版本为7.7)。 尝试使用更新的GDB重现此问题。

如果问题仍然存在,则可能

  • GDB中有一个错误
  • engine程序是故意破坏的ELF文件,采用了某种反调试/反逆向工程技术。

如果您可以在某个地方使用二进制engine ,我可以看一下。

===============>>#2 票数:-1

也许该程序是发行版本,而不是调试版本。

  ask by packetie translate from so

未解决问题?本站智能推荐: