From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20113 invoked by alias); 15 Oct 2010 13:49:06 -0000 Received: (qmail 20104 invoked by uid 22791); 15 Oct 2010 13:49:05 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_FRT_POSSIBLE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm15.bullet.mail.sp2.yahoo.com (HELO nm15.bullet.mail.sp2.yahoo.com) (98.139.91.85) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 15 Oct 2010 13:48:59 +0000 Received: from [98.139.91.64] by nm15.bullet.mail.sp2.yahoo.com with NNFMP; 15 Oct 2010 13:48:58 -0000 Received: from [98.139.91.36] by tm4.bullet.mail.sp2.yahoo.com with NNFMP; 15 Oct 2010 13:48:58 -0000 Received: from [127.0.0.1] by omp1036.mail.sp2.yahoo.com with NNFMP; 15 Oct 2010 13:48:57 -0000 Received: (qmail 55985 invoked by uid 60001); 15 Oct 2010 13:48:57 -0000 Message-ID: <221705.52663.qm@web112503.mail.gq1.yahoo.com> Received: from [123.238.27.144] by web112503.mail.gq1.yahoo.com via HTTP; Fri, 15 Oct 2010 06:48:57 PDT References: <717587.85098.qm@web112501.mail.gq1.yahoo.com> <20101015131534.GA17486@host1.dyn.jankratochvil.net> Date: Fri, 15 Oct 2010 13:49:00 -0000 From: paawan oza Subject: Re: reversible debugging, enhancements, proposals To: Jan Kratochvil Cc: gdb@sourceware.org In-Reply-To: <20101015131534.GA17486@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00054.txt.bz2 Hi, yes, I understand that you have mentioned. perhaps this can be achieved by 'source' command, macros and even probably a shell script. but my point is: it becomes cumbesome for user to go and modify the file/.gdbinit macro or script. it does not provide that facility right on the live terminal (inspecting sort of direct machinism such as prin command). say, for a case, you have losts of data streuctures like linked list, complex tree, btree etc.... and most of the user is not predetermined to se where he wants to look....it would be more comfortable for him if everything he can look on the fly as fast and as conveniently as possiblle. Regards, Oza. ----- Original Message ---- From: Jan Kratochvil To: paawan oza Cc: gdb@sourceware.org Sent: Fri, October 15, 2010 6:45:34 PM Subject: Re: reversible debugging, enhancements, proposals 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