update gdb scripts for new hash format

This commit is contained in:
Anthony Minessale 2014-12-04 13:31:19 -05:00
parent 8ed2b0737f
commit 2ce2dccf21
1 changed files with 33 additions and 18 deletions

View File

@ -6,11 +6,17 @@ define list_sessions
dont-repeat dont-repeat
printf "Listing sessions: \n" printf "Listing sessions: \n"
set $i = 0 set $i = 0
set $x=session_manager.session_table->table->first set $idx = 0
while($x != 0x0) set $len = session_manager.session_table->tablelength
printf "uuid %s is at %p\n", $x->pKey, $x->data while($idx < $len)
set $x = $x->next set $x = session_manager.session_table->table[$idx]
set $i = $i + 1 while($x != 0x0)
printf "uuid %s is at %p\n", $x->k, $x->v
set $i = $i + 1
set $x = $x->next
end
set $idx = $idx + 1
end end
printf "Found %d sessions.\n", $i printf "Found %d sessions.\n", $i
end end
@ -21,11 +27,16 @@ end
define hash_it_str define hash_it_str
dont-repeat dont-repeat
set $i = 0 set $i = 0
set $x=$arg0->table->first set $idx = 0
while($x != 0x0) set $len = $arg0->tablelength
printf "key: %s valueptr: %p\n", $x->pKey, $x->data
set $x = $x->next while($idx < $len)
set $i = $i + 1 set $x=$arg0->table->[$idx]
while($x != 0x0)
printf "key: %s valueptr: %p\n", $x->k, $x->v
set $x = $x->next
set $i = $i + 1
end
end end
end end
document hash_it_str document hash_it_str
@ -37,14 +48,18 @@ end
define hash_it_str_x define hash_it_str_x
dont-repeat dont-repeat
set $i = 0 set $i = 0
set $x=$arg0->table->first set $idx = 0
while($x != 0x0) set $len = $arg0->tablelength
printf "key: %s\n", $x->pKey while($idx < $len)
print (($arg1*)$x->data)->$arg2 set $x=$arg0->table->[$idx]
printf "\n\n" while($x != 0x0)
set $x = $x->next printf "key: %s\n", $x->k
set $i = $i + 1 print (($arg1*)$x->v)->$arg2
end printf "\n\n"
set $x = $x->next
set $i = $i + 1
end
end
end end
document hash_it_str_x document hash_it_str_x
Usage: hash_it_str_x [hashtable] [value_type] [member] Usage: hash_it_str_x [hashtable] [value_type] [member]