我正在尝试使用gdb来记录valgrind的gdbserver中的执行,如下所示:
valgrind --vgdb-error=0 path/to/binary args
$ gdb path/to/binary
(gdb) target remote | vgdb
0x0000000004001090 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) target record-full
(gdb) c
Continuing.
/build/gdb-GT4MLW/gdb-8.1/gdb/target.c:3132: internal-error: gdbarch* default_thread_architecture(target_ops*, ptid_t): Assertion `inf != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
This is a bug, please report it. For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.
/build/gdb-GT4MLW/gdb-8.1/gdb/target.c:3132: internal-error: gdbarch* default_thread_architecture(target_ops*, ptid_t): Assertion `inf != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(gdb)
我希望使用记录的执行来设置读/写观察点并反向执行以查看它的使用位置。我一直在运行valgrind的gdbserver来打破发生无效读/写时发出的SIGTRAP。
这真的是一个错误,还是我做错了/不支持?
valgrind gdbserver不支持记录。
见http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver-limitations