From 02c2070831c36926e60e1aaa6323cf2fa39757dd Mon Sep 17 00:00:00 2001 From: lace <> Date: Sun, 6 Jul 2008 06:59:32 +0000 Subject: [PATCH] Cleanup and document the commands. +define debug --- .gdbinit | 58 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/.gdbinit b/.gdbinit index ecf3132..1fbf968 100644 --- a/.gdbinit +++ b/.gdbinit @@ -4,38 +4,50 @@ set history save on # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106814 set complaints 0 -define rt - break $arg0 - run -# clear $arg0 - end -define ct - tbreak $arg0 - continue - end -define rtl - start - break $arg0 - continue -# clear $arg0 - end define javadump call _Jv_DeepDebug($arg0) - end -define pglist3 +end +document javadump +call _Jv_DeepDebug($arg0) +end +define pglist if (*("$arg1")=='@') set var $arg1=struct $arg1 - end + end set var $pglist_list=$arg0 while ($pglist_list) - if (!strcmp("$arg2",".")) + if $argc==2 print *(($arg1 *)$pglist_list->data) else print *(($arg1 *)$pglist_list->data)$arg2 - end - set var $pglist_list=$pglist_list->next end + set var $pglist_list=$pglist_list->next end -define pglist - pglist3 $arg0 $arg1 . +end +document pglist +GList or GSList dumper iterating by `->next': +pglist {|@} [] +end +define plist + set var $plist_iter=$arg0 + while ($plist_iter) + if $argc==1 + print *$plist_iter + else + print $plist_iter->$arg1 + end + set var $plist_iter=$plist_iter->next end +end +document plist +List dumper iterating by `->next': +plist [] +end +define debug + set debug infrun 1 + set debug lin-lwp 1 +end +document debug +set debug infrun 1 +set debug lin-lwp 1 +end -- 1.8.3.1