From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23460 invoked by alias); 15 Oct 2010 13:15:48 -0000 Received: (qmail 23451 invoked by uid 22791); 15 Oct 2010 13:15:47 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Oct 2010 13:15:39 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9FDFbHH022496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Oct 2010 09:15:38 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9FDFZTM008443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Oct 2010 09:15:37 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o9FDFZ1l017643; Fri, 15 Oct 2010 15:15:35 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o9FDFYdg017642; Fri, 15 Oct 2010 15:15:34 +0200 Date: Fri, 15 Oct 2010 13:15:00 -0000 From: Jan Kratochvil To: paawan oza Cc: gdb@sourceware.org Subject: Re: reversible debugging, enhancements, proposals Message-ID: <20101015131534.GA17486@host1.dyn.jankratochvil.net> References: <717587.85098.qm@web112501.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <717587.85098.qm@web112501.mail.gq1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2010-10/txt/msg00052.txt.bz2 On Fri, 15 Oct 2010 11:30:47 +0200, paawan oza wrote: > 1) if we want to debug the long linked list chain, we need to to move manually > next, next, and so on... > so if you want to to see 100th node's value, or want to know cerain field's > value in all nodes.... (there also could be level of nesting in the list also, > > for e.g. list->some_field->next and so on...) then it becomes cumbersome and > difficult. > I am not sure whether that facility is available, but I think it is a very > useful feature, if it is not there. Using this .gdbinit macro: define plist set var $plist_iter=$arg0 while ($plist_iter) if $argc==1 print *$plist_iter else if $argc==2 print $plist_iter->$arg1 else print$arg2 $plist_iter->$arg1 end end set var $plist_iter=$plist_iter->next end end document plist List dumper iterating by `->next': plist [] [/] end Regards, Jan