gdb中的“target record-full”使printf上的“n”命令失败,并显示“Process record does not support instruction 0xc 5 at address 0x 7 ffff 7 dee 6 e7”?

yh2wf1be  于 2023-05-28  发布在  其他
关注(0)|答案(2)|浏览(175)

我特灵在gdb中使用“reverse-step”和“reverse-next”命令。堆栈溢出告诉我,我应该在我希望“rn”和“rs”的执行上下文中运行“target record-full”。但发生了一个奇怪的错误:
我编译并运行这个程序:

(gdb) b 4
Breakpoint 1 at 0x40052a: file test02.c, line 4.
(gdb) r
Starting program: /home/Troskyvs/a.out 

Breakpoint 1, fa () at test02.c:6
6     ++i;
(gdb) target record-full
(gdb) n
7     printf("%d\n",i);
(gdb) n                      # Error happens here!
Process record does not support instruction 0xc5 at address 0x7ffff7dee6e7.
Process record: failed to record execution log.

Program stopped.
_dl_runtime_resolve_avx () at ../sysdeps/x86_64/dl-trampoline.h:81
81  ../sysdeps/x86_64/dl-trampoline.h: No such file or directory.

如果我不运行“target record-full”,那么第二个“n”就可以运行到下一行。我不太明白这里的错误信息。
是否与“目标记录已满”有关?我怎么能征服它?
我尝试了另一种方法:

(gdb) set exec-direction reverse
(gdb) n

No more reverse-execution history.
fa () at test02.c:7
7     printf("%d\n",i);
(gdb) n

No more reverse-execution history.
fa () at test02.c:7
7     printf("%d\n",i);
(gdb) n

好吧,它不起作用

qhhrdooz

qhhrdooz1#

GDB 7.11.1起不支持AVX

潜在的问题似乎是AVX指令目前不受支持,但glibc在Ubuntu 16.04 64位上使用它们:

rr是一个很棒的工作替代方案:https://github.com/mozilla/rr下面是一个最小的工作示例:在函数返回的GDB中设置断点

elcex8rz

elcex8rz2#

实际上,对于简单的情况,如果您将参数“-static”添加到gcc编译命令中,则record-full应该可以工作。

相关问题