【问题标题】:GDB not able to recognise executable which is unstrippedGDB 无法识别未剥离的可执行文件
【发布时间】:2016-05-07 15:13:04
【问题描述】:

我在我的 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 位版本。但它仍然无法正常工作。

【问题讨论】:

    标签: gdb executable elf


    【解决方案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。您需要一个不同的 GDB,配置为 --target=aarch64-linux-android

    【讨论】:

      猜你喜欢
      • 2016-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-18
      相关资源
      最近更新 更多