0

以下の詳細は、Solaris10を実行しているSunマシンでのセッションからのものです。

$ file devli
devli: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
$ file a
a: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
$ gdb
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10".
(gdb) file a
Reading symbols from /tmp/tnmy/a...(no debugging symbols found)...done.
(gdb) file devli
"/tmp/tnmy/devli": not in executable format: File format not recognized
(gdb) q
$ ls -l a devlisrvr
-rwxr-xr-x   1 test2    dba         1480 Dec 23 18:23 a
-rwxr-xr-x   1 test2    dba       633088 Dec 23 18:26 devli
$ uname -a ;
SunOS myhost 5.10 Generic_127111-11 sun4v sparc SUNW,SPARC-Enterprise-T5220
$ cat a.c
int main() {return 0;}
$ /opt/SUNONE8/SUNWspro/bin/CC -V
CC: Sun C++ 5.5 2003/03/12
$ file `which gdb`
/usr/local/bin/gdb: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
$

gdbがファイル形式を認識しない理由の詳細はdevli?インターネットで検索しましたが、この特定の問題に関連するものは見つかりませんでした。任意のポインタが役立ちます。

a.cに入るa、gccを使用して構築された; devliSun ONEStudio8を使用します。

4

1 に答える 1

0

GDB6.4 は 4 年前のものであることに注意してください。GDB(現在の) 7.0で運が良くなるかもしれません。

また、devli実行可能ファイルが破損している可能性もあります (実行可能ファイルfileの最初の数バイトを確認するだけGDBで、自己整合性を維持するにはさらに多くのファイルの内容が必要です)。readelf --all > /dev/null警告を報告しますか?

于 2009-12-26T01:32:31.273 に答える