我在我的linux机器上使用GDB可执行文件来调试我的可执行文件(rild)。
rild: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=d100d90599eb3764018356c9ef3e1840, not stripped
然而,当我运行命令
时./arm-linux-androideabi-gdb ~/android_gdb/system_bin/rild
GNU gdb (GDB) 7.6
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 "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
<http://source.android.com/source/report-bugs.html>...
"/home/user/android_gdb/system_bin/rild": not in executable format: File format not recognized
我可以看到GDB也是64位版本,可执行ELF也是未剥离的,64位。但它还是不起作用。
答案 0 :(得分:1)
rild: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV),
这是一个aarch64
64位ARM二进制文件。
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android"
此GDB是一个64位x86_64
二进制文件,配置为调试32位ARM二进制文件。
GDB本身是一个64位二进制文件的事实是无关紧要的。重要的是它被配置为调试的目标。您需要使用--target=aarch64-linux-android
配置的其他GDB。