From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9414 invoked by alias); 25 Aug 2010 20:43:19 -0000 Received: (qmail 9406 invoked by uid 22791); 25 Aug 2010 20:43:19 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mtaout03-winn.ispmail.ntl.com (HELO mtaout03-winn.ispmail.ntl.com) (81.103.221.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Aug 2010 20:43:13 +0000 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20100825204257.WTXV3075.mtaout03-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Wed, 25 Aug 2010 21:42:57 +0100 Received: from [192.168.0.2] (really [86.9.212.44]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20100825204257.PVWI12520.aamtaout02-winn.ispmail.ntl.com@[192.168.0.2]>; Wed, 25 Aug 2010 21:42:57 +0100 Message-ID: <4C758049.9080008@fano.co.uk> Date: Wed, 25 Aug 2010 20:43:00 -0000 From: David McQuillan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: paawan oza CC: gdb@sourceware.org Subject: Re: reverse debugging implementation + commands References: <4C712882.9040700@fano.co.uk> <312153.55254.qm@web112503.mail.gq1.yahoo.com> In-Reply-To: <312153.55254.qm@web112503.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2010-08/txt/msg00151.txt.bz2 Just a bit on testing for conditions when going backwards. Just had a look at reverse.c and it is very different from anything I ever did. To find the last time a location was changed for instance it looks like it would go back one instruction at a time until the condition is satisfied. I can see a middle way that encompasses both approaches in that if the registers are saved on every single instruction my approach ends up being the same as what reverse.c does so I've written it up here that way: set found counter to unset set check counter to here while found counter is null and we can go backwards roll back from check counter to previous save point go forward till check counter reached if condition set then set found counter to instruction counter endif if found counter not set roll back to last save point set check counter to this point endif endwhile At the end of this found counter if set gives the instruction counter when the condition was last satisfied. With this there is no special work needed to check conditions when going backwards compared to going forwards. David