This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Process record and replay, 8/10
- From: Doug Evans <dje at google dot com>
- To: teawater <teawater at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 6 Nov 2008 09:39:55 -0800
- Subject: Re: [RFA] Process record and replay, 8/10
- References: <daef60380811052350v3232a91ep6241e687f2f18be@mail.gmail.com>
On Wed, Nov 5, 2008 at 11:50 PM, teawater <teawater@gmail.com> wrote:
> This patch add code to make I386 architecture support process record and replay.
>
> 2008-11-06 Hui Zhu <teawater@gmail.com>
>
> I386 architecture process record and replay support.
>
> * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
> PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the I386
> instruction.
> (aflag, dflag, override, modrm, mod, reg, rm, ot,
> i386_record_pc): New variables. Ditto.
> (i386_record_modrm, i386_record_lea_modrm_addr,
> i386_record_lea_modrm): New functions. Ditto.
> (i386_process_record): New function. Parse the instruction in
> address "addr" and record the values of registers and memory
> that will be change in this instruction.
> (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
> "process_record" interface.
> * i386-tdep.h (gdbarch_tdep): New function pointers
> "i386_intx80_record" and "i386_sysenter_record" that point to
> the function can record "intx80" and "sysenter" execute log.
>
> i386-tdep.c | 2706 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> i386-tdep.h | 3
> 2 files changed, 2709 insertions(+)
>
fwiw ...
This is a case where I would REALLY like to see the code not live in
i386-tdep.c.
Maybe i386-tdep-<foo>.c? i386-<foo>.c?
Reverse execution is a significant enough and self-contained enough
feature that it (and gdb) would be more maintainable with more
isolation (so to speak).
[insert my usual wistfulness regarding building applications out of libraries]