我在我的Ubuntu 12.04(64位)有一個程序(不是shell腳本)的格式,它運行良好,但是,當我附上用gdb它,有消息文件格式不被識別。這很令人費解。任何想法爲什麼?謝謝。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
[email protected]:~/projs/jsStress_compile
對於發佈版本,我不希望看到任何符號,但不應該是消息「不是可執行文件格式:**文件格式無法識別**」。謝謝。 – packetie
GDB完全能夠調試發行版二進制文件。這個答案完全是假的。 –