我正试图使用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。
这是真的错误吗,还是我做错了什么/不受支持?
答案 0 :(得分:1)
valgrind gdbserver不支持记录。
请参见http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver-limitations