X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.gdbinit;h=5a1e9b73b13d3656555ed59f995b80cbdf18c092;hp=b3f7baed2256d5b6fcfed93f5dec203f07fc45d2;hb=HEAD;hpb=0288190d6f538c3be15f18845ec691348db004f1 diff --git a/.gdbinit b/.gdbinit index b3f7bae..8a01500 100644 --- a/.gdbinit +++ b/.gdbinit @@ -1,15 +1,27 @@ +set break pending on +set style enabled off # See .bashrc: export GDBHISTFILE="$HOME/.gdb_history" # Should also work (untested): # set history filename ~/.gdb_history set history save on # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106814 set complaints 0 +set record full insn-number-max 10000000 +define u + up +end +document u +up +end define javadump call _Jv_DeepDebug($arg0) end document javadump call _Jv_DeepDebug($arg0) end +define pjstr + p *$arg0._body@$arg0._length +end define pglist if (*("$arg1")=='@') set var $arg1=struct $arg1 @@ -34,14 +46,18 @@ 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 [] +plist [] [/] end define countlist set var $countlist_iter=$arg0 @@ -72,3 +88,12 @@ define nip nexti x/i $pc end + +define mycommand + set $i = 0 + set $foo1=$arg1 + while $i < $argc + eval "print $foo%d", $i + set $i = $i + 1 + end +end