From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20541 invoked by alias); 3 Dec 2009 03:05:20 -0000 Received: (qmail 20531 invoked by uid 22791); 3 Dec 2009 03:05:19 -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-f223.google.com (HELO mail-ew0-f223.google.com) (209.85.219.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Dec 2009 03:05:08 +0000 Received: by ewy23 with SMTP id 23so1011723ewy.4 for ; Wed, 02 Dec 2009 19:05:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.24.25 with SMTP id t25mr8249092ebb.73.1259809505476; Wed, 02 Dec 2009 19:05:05 -0800 (PST) In-Reply-To: <003201ca7373$29b6f590$7d24e0b0$@com> References: <5e81cb500911262231g57f693dwc885576172e016e1@mail.gmail.com> <5e81cb500911270742j546062f2jca7441a912ffad87@mail.gmail.com> <4B10154F.7070902@vmware.com> <5e81cb500911271745t1a119520l4944919d2139e8ae@mail.gmail.com> <4B11607C.7000500@vmware.com> <5e81cb500911300539r52e8be5dva54d32c734978021@mail.gmail.com> <00a701ca7279$f1a03c60$d4e0b520$@com> <4B157A21.9020603@undo-software.com> <003201ca7373$29b6f590$7d24e0b0$@com> Date: Thu, 03 Dec 2009 03:05:00 -0000 Message-ID: <5e81cb500912021905s2ccdac7ft5439ce2162d1ce32@mail.gmail.com> Subject: Re: System call support in reversible debugging From: Sean Chen To: Jakob Engblom Cc: Greg Law , Hui Zhu , 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-12/txt/msg00018.txt.bz2 On Thu, Dec 3, 2009 at 1:16 AM, Jakob Engblom wrote: >> >> Hi Michael and Hui, >> >> >> >> I am sorry for my late response. >> >> >> >> Thanks for your explanation. So we can't 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? >> > >> > To really do this right, you should use a full-system simulator that l= ets > you >> > debug OS and user code at the same time, as it is attacking the system= at > the >> > hardware/software interface level. >> >> It all depends what you want to do. >> >> If you want to debug kernel code, then absolutely you need a full system >> approach, such as Simics or VMware offers. =A0Similarly if you want to >> debug the whole host. =A0But if you're debugging just a process (i.e. the >> classic use-case of gdb), you may not want to wind back the state of the >> entire (virtual) machine. =A0In which case, something like UndoDB or prec >> is more appropriate. >> >> I don't claim either approach is superior. =A0It's a bit like native >> debugging versus remote debugging. =A0Which one makes most sense all >> depends on what it is you're trying to debug. > > Couldn't agree more. =A0The full-system approach is a bit more gnarly, bu= t it > gives you more insight. =A0It depends on the problem. > > /jakob > > Hi Jakob and Greg, You are both right. These two solutions focus on different problems. If you want to debug a user space process and don=92t care what=92s going on in the system call at all, Michael=92s solution is OK. If you want to look more closely into the kernel, a full-system simulator is absolutely the best one. --=20 Best Regards, Sean Chen