From: paawan oza <paawan1982@yahoo.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: reversible debugging, enhancements, proposals
Date: Fri, 15 Oct 2010 13:49:00 -0000 [thread overview]
Message-ID: <221705.52663.qm@web112503.mail.gq1.yahoo.com> (raw)
In-Reply-To: <20101015131534.GA17486@host1.dyn.jankratochvil.net>
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 <jan.kratochvil@redhat.com>
To: paawan oza <paawan1982@yahoo.com>
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 <head pointer> [<data field to display>] [/<format>]
end
Regards,
Jan
next prev parent reply other threads:[~2010-10-15 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 9:31 paawan oza
2010-10-15 13:15 ` Jan Kratochvil
2010-10-15 13:49 ` paawan oza [this message]
2010-10-15 15:18 ` Jan Kratochvil
2010-10-15 17:43 ` paawan oza
2010-10-15 18:22 ` Tom Tromey
2010-10-16 8:03 paawan oza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=221705.52663.qm@web112503.mail.gq1.yahoo.com \
--to=paawan1982@yahoo.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox