From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29642 invoked by alias); 30 Nov 2009 13:39:40 -0000 Received: (qmail 29633 invoked by uid 22791); 30 Nov 2009 13:39:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f215.google.com (HELO mail-ew0-f215.google.com) (209.85.219.215) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Nov 2009 13:39:33 +0000 Received: by ewy7 with SMTP id 7so4392504ewy.8 for ; Mon, 30 Nov 2009 05:39:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.25.79 with SMTP id y15mr1646993ebb.24.1259588370156; Mon, 30 Nov 2009 05:39:30 -0800 (PST) In-Reply-To: References: <5e81cb500911262231g57f693dwc885576172e016e1@mail.gmail.com> <5e81cb500911270711wb99d531i111d064f05ef03b4@mail.gmail.com> <5e81cb500911270742j546062f2jca7441a912ffad87@mail.gmail.com> <4B10154F.7070902@vmware.com> <5e81cb500911271745t1a119520l4944919d2139e8ae@mail.gmail.com> <4B11607C.7000500@vmware.com> Date: Mon, 30 Nov 2009 16:29:00 -0000 Message-ID: <5e81cb500911300539r52e8be5dva54d32c734978021@mail.gmail.com> Subject: Re: System call support in reversible debugging From: Sean Chen To: Hui Zhu Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00216.txt.bz2 On Mon, Nov 30, 2009 at 8:27 PM, Hui Zhu wrote: > Cool! I think your explain is very clear. Thanks. =A0:) > > Hui > > On Sun, Nov 29, 2009 at 01:40, Michael Snyder wrote: >> Sean Chen wrote: >>> >>> On Sat, Nov 28, 2009 at 2:07 AM, Michael Snyder >>> wrote: >>>> >>>> These are two separate questions. =A0I think the one you started with >>>> is can gdb record a system call, and the answer is "yes". >>>> >>>> >>>> The issue with mmap has a lot of history, and rather than try to >>>> explain it, I urge you to look up the threads which have "mmap" >>>> or "sbrk" in the title) and read them. >>>> >>>> >>> >>> Thanks for the explanation. That is very kind of you. >>> >>> I am confused about the first question. How does gdb record the system >>> call instructions? You know, they are in the kernel space? It seems >>> that I must have made a mistake somewhere. Please help to clarify. >>> >>> Thanks in advance. >> >> Sean, >> >> I wish I understood this better -- maybe Hui will explain it more. >> >> As I understand it, each system call is recorded as if it were a >> single instruction. =A0Instead of 'tracing' into the system code, >> we know the specific side effects for each system call, and for >> instance if the syscall will write to a buffer we take a snapshot >> of that buffer first. >> >> Michael >> >> > Hi Michael and Hui, I am sorry for my late response. Thanks for your explanation. So we can=92t treat the system calls as a black box and have to understand the detailed implementation of each system call. I think we need to understand every lines of the code in the system calls carefully enough, and care about the difference of the Linux kernel since the code of system calls might change frequently. Do we have any good ways to do it? Thanks. --=20 Best Regards, Sean Chen