gdb fails to run ELF 64-bit program with “File format not recognized”

后端 未结 5 1734
不知归路
不知归路 2021-02-13 13:02

I\'m trying to use GDB to debug (to find an annoying segfault). When I run:

gdb ./filename

from the command line, I get the following error:

5条回答
  •  清酒与你
    2021-02-13 13:44

    It seems your GNU Debugger (gdb) doesn't support x86_64 architecture.

    So try LLDB Debugger (lldb) which aims to replace it. It supports i386, x86-64 and ARM instruction sets.

    It's available by default on BSD/OS X, on Linux install via: sudo apt-get install lldb (or use yum).

    See: gdb to lldb command map page for more info.

提交回复
热议问题