From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2382 invoked by alias); 28 Nov 2009 17:44:57 -0000 Received: (qmail 2372 invoked by uid 22791); 28 Nov 2009 17:44:57 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 Nov 2009 17:44:53 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 77E5058047; Sat, 28 Nov 2009 09:44:51 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id 6D2B3CD903; Sat, 28 Nov 2009 09:44:51 -0800 (PST) Message-ID: <4B11607C.7000500@vmware.com> Date: Mon, 30 Nov 2009 12:27:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: Sean Chen CC: Hui Zhu , "gdb@sourceware.org" Subject: Re: System call support in reversible debugging References: <5e81cb500911262231g57f693dwc885576172e016e1@mail.gmail.com> <5e81cb500911270711wb99d531i111d064f05ef03b4@mail.gmail.com> <5e81cb500911270742j546062f2jca7441a912ffad87@mail.gmail.com> <4B10154F.7070902@vmware.com> <5e81cb500911271745t1a119520l4944919d2139e8ae@mail.gmail.com> In-Reply-To: <5e81cb500911271745t1a119520l4944919d2139e8ae@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00211.txt.bz2 Sean Chen wrote: > On Sat, Nov 28, 2009 at 2:07 AM, Michael Snyder wrote: >> These are two separate questions. I 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. Instead 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