This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Process record and replay checked in to main trunk
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 01 May 2009 16:27:02 +0300
- Subject: Re: Process record and replay checked in to main trunk
- References: <daef60380904300059g191dfe0bu7773ee01f35892bf@mail.gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
It would be nice if i386-tdep.c had some comments about what it takes
for another x86 target to add support for process recording and
replay. Apologies if it's already described somewhere and I missed
it.
It looks like all is needed is to define suitable functions for
tdep->i386_intx80_record and tdep->i386_sysenter_record, is that
right? (If so, why so Linux-centric names?)
Also, some architectural overview of how the record/replay target
works would be nice, either in the comments or in gdbint.texinfo. For
example, just looking at i386_linux_intx80_sysenter_record, I cannot
understand how it succeed to record both the arguments to the syscall
and the return value. The syscall itself does not happen inside
record_linux_system_call, that just records the syscall parameters and
data buffers, right? And recording happens _before_ the instruction
being recorded executes, right? So how come
i386_linux_intx80_sysenter_record can use EAX as the syscall number
and immediately after the call to record_linux_system_call treat the
value of EAX as the value returned by the syscall? What am I missing
here?
It probably doesn't help that I don't know enough about how the target
stack works, but that isn't described, either, at least not in
target.[ch], right? The only thing I found is some very high-level
description at the beginning of target.h.