From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4568 invoked by alias); 6 Nov 2008 17:40:38 -0000 Received: (qmail 4490 invoked by uid 22791); 6 Nov 2008 17:40:37 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Nov 2008 17:40:00 +0000 Received: from spaceape23.eur.corp.google.com (spaceape23.eur.corp.google.com [172.28.16.75]) by smtp-out.google.com with ESMTP id mA6HdvE6010325 for ; Thu, 6 Nov 2008 17:39:57 GMT Received: from rv-out-0708.google.com (rvbf25.prod.google.com [10.140.82.25]) by spaceape23.eur.corp.google.com with ESMTP id mA6HdqUQ005588 for ; Thu, 6 Nov 2008 09:39:56 -0800 Received: by rv-out-0708.google.com with SMTP id f25so916262rvb.18 for ; Thu, 06 Nov 2008 09:39:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.125.19 with SMTP id x19mr1459267rvc.1.1225993195469; Thu, 06 Nov 2008 09:39:55 -0800 (PST) In-Reply-To: References: Date: Thu, 06 Nov 2008 17:40:00 -0000 Message-ID: Subject: Re: [RFA] Process record and replay, 8/10 From: Doug Evans To: teawater Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00110.txt.bz2 On Wed, Nov 5, 2008 at 11:50 PM, teawater wrote: > This patch add code to make I386 architecture support process record and replay. > > 2008-11-06 Hui Zhu > > 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-.c? i386-.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]