如何在gdb调试中禁用`shlx`指令以能够使用`record`命令?

时间:2019-04-14 21:31:27

标签: gdb

-Wl,-z,now仅对xsave指令有帮助,但是record仍然无法实现,因为它在shlx指令中失败(在gentoo上使用gdb 8.2.1)... < / p>

$ LDFLAGS="-Wl,-z,now" CFLAGS="-ggdb" make test
cc -ggdb  -Wl,-z,now  test.c   -o test
$ LD_BIND_NOW=1 gdb ./test
Reading symbols from ./test...done.
(gdb) b main
Breakpoint 1 at 0x11aa: file test.c, line 9.
(gdb) run
Starting program: /home/user/pokusy/c/reverse-debug/test 

Breakpoint 1, main () at test.c:9
9       int main(void) {
(gdb) record
(gdb) cont
Continuing.
Process record does not support instruction 0xc4 at address 0x7ffff7a94023.
Process record: failed to record execution log.

Program stopped.
0x00007ffff7a94023 in _int_malloc () from /lib64/libc.so.6
(gdb) x/i 0x7ffff7a94023
=> 0x7ffff7a94023 <_int_malloc+1763>:   shlx   %eax,%ecx,%eax
(gdb) 

0 个答案:

没有答案