X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=.gdbinit;h=1fbf9687eb9466deabaa1682bb6c64ac2c45c868;hp=68597bffb4dead7558a5f7d5eb7c20ac9fa095ae;hb=00a77cb80da30b00f718560ba20e3c1cc1c2d7c5;hpb=b5527eeeccc01a574b1324038527f0be786b73d2 diff --git a/.gdbinit b/.gdbinit index 68597bf..1fbf968 100644 --- a/.gdbinit +++ b/.gdbinit @@ -1,36 +1,53 @@ -# Appears to be a default everywhere now: -#set history filename /home/lace/.gdb_history -#set history save on -define rt - break $arg0 - run -# clear $arg0 - end -define ct - tbreak $arg0 - continue - end -define rtl - tbreak main - run - break $arg0 - continue -# clear $arg0 - end -define pglist3 +# 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 +define javadump + call _Jv_DeepDebug($arg0) +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