+.config/yt-dlp.conf
[nethome.git] / .gdbinit
1 set break pending on
2 set style enabled off
3 # See .bashrc: export GDBHISTFILE="$HOME/.gdb_history"
4 # Should also work <jefyi6bzm6.fsf@sykes.suse.de> (untested):
5 # set history filename ~/.gdb_history
6 set history save on
7 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106814
8 set complaints 0
9 set record full insn-number-max 10000000
10 define u
11         up
12 end
13 document u
14 up
15 end
16 define javadump
17         call _Jv_DeepDebug($arg0)
18 end
19 document javadump
20 call _Jv_DeepDebug($arg0)
21 end
22 define pjstr
23         p *$arg0._body@$arg0._length
24 end
25 define pglist
26         if (*("$arg1")=='@')
27                 set var $arg1=struct $arg1
28         end
29         set var $pglist_list=$arg0
30         while ($pglist_list)
31                 if $argc==2
32                         print *(($arg1 *)$pglist_list->data)
33                 else
34                         print *(($arg1 *)$pglist_list->data)$arg2
35                 end
36                 set var $pglist_list=$pglist_list->next
37         end
38 end
39 document pglist
40 GList or GSList dumper iterating by `->next':
41 pglist <head pointer> {<data type>|@<struct data type>} [<data field to display>]
42 end
43 define plist
44         set var $plist_iter=$arg0
45         while ($plist_iter)
46                 if $argc==1
47                         print *$plist_iter
48                 else
49                         if $argc==2
50                                 print $plist_iter->$arg1
51                         else
52                                 print$arg2 $plist_iter->$arg1
53                         end
54                 end
55                 set var $plist_iter=$plist_iter->next
56         end
57 end
58 document plist
59 List dumper iterating by `->next':
60 plist <head pointer> [<data field to display>] [/<format>]
61 end
62 define countlist
63         set var $countlist_iter=$arg0
64         set var $countlist_count=0
65         while ($countlist_iter)
66                 set var $countlist_iter=$countlist_iter->next
67                 set var $countlist_count=$countlist_count+1
68         end
69         p $countlist_count
70 end
71 document countlist
72 List elements counter iterating by `->next':
73 countlist <head pointer>
74 end
75 define debug
76         set debug infrun 1
77         set debug lin-lwp 1
78 end
79 document debug
80 set debug infrun 1
81 set debug lin-lwp 1
82 end
83 define sip
84         stepi
85         x/i $pc
86 end
87 define nip
88         nexti
89         x/i $pc
90 end
91
92 define mycommand
93   set $i = 0
94   set $foo1=$arg1
95   while $i < $argc
96     eval "print $foo%d", $i
97     set $i = $i + 1
98   end
99 end