【发布时间】:2019-01-30 11:46:26
【问题描述】:
我写了一个简单的 C 程序来打印 hello world。然后我运行它
aarch64-linux-gnu-gcc -ohello hello.c -static -g3
gdb-multiarch hello
在此之后,我run 和 gdb 遇到内部错误:
Reading symbols from hello...done.
(gdb) r
Starting program: /home/gt/hello
/build/gdb-GT4MLW/gdb-8.1/gdb/i387-tdep.c:592: internal-error: void i387_supply_fxsave(regcache*, int, const void*): Assertion `tdep->st0_regnum >= I386_ST0_REGNUM' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
这是file hello的输出:
hello: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.7.0, BuildID[sha1]=a...b, with debug_info, not stripped
这是我的hello.c:
#include<stdio.h>
int main(){
printf("hello world");
return 0;
}
我做错了什么?我还需要做什么?我在 x86_64 机器上运行 Ubuntu 18.04。
当我使用gdb hello时,我无法使用断点,我得到这个错误:
Reading symbols from hello...done.
(gdb) break 4
Breakpoint 1 at 0x400404: file hello.c, line 4.
(gdb) r
Starting program: /home/gt/hello
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x400404
(gdb)
我正在遵循第一部分下this page 提供的指南。
【问题讨论】: