+set break pending on
+set style enabled off
# See .bashrc: export GDBHISTFILE="$HOME/.gdb_history"
# Should also work <jefyi6bzm6.fsf@sykes.suse.de> (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
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
set debug infrun 1
set debug lin-lwp 1
end
+define sip
+ stepi
+ x/i $pc
+end
+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