Make Perl env compatible with F-16 Perl local::lib.
[nethome.git] / .gdbinit
index 1fbf968..5a1e9b7 100644 (file)
--- a/.gdbinit
+++ b/.gdbinit
@@ -4,6 +4,7 @@
 set history save on
 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106814
 set complaints 0
+set record insn-number-max 10000000
 define javadump
        call _Jv_DeepDebug($arg0)
 end
@@ -34,14 +35,31 @@ define plist
                if $argc==1
                        print *$plist_iter
                else
-                       print $plist_iter->$arg1
+                       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>]
+plist <head pointer> [<data field to display>] [/<format>]
+end
+define countlist
+       set var $countlist_iter=$arg0
+       set var $countlist_count=0
+       while ($countlist_iter)
+               set var $countlist_iter=$countlist_iter->next
+               set var $countlist_count=$countlist_count+1
+       end
+       p $countlist_count
+end
+document countlist
+List elements counter iterating by `->next':
+countlist <head pointer>
 end
 define debug
        set debug infrun 1
@@ -51,3 +69,11 @@ document debug
 set debug infrun 1
 set debug lin-lwp 1
 end
+define sip
+       stepi
+       x/i $pc
+end
+define nip
+       nexti
+       x/i $pc
+end