-
-
Notifications
You must be signed in to change notification settings - Fork 564
/
.gdbinit
40 lines (36 loc) · 822 Bytes
/
.gdbinit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
define __pxdllist
set $l = (xdebug_llist*)$arg0
set $h = $l->head
print *(xdebug_hash_element*)((*(xdebug_llist_element *) $h).ptr)
while $h->next
print *(xdebug_hash_element*)((*(xdebug_llist_element *) $h).ptr)
end
end
define pxdhash
set $ht = (xdebug_hash*)$arg0
set $n = $ht->slots
set $i = 0
while $i < $n
if $ht->table[$i]->size != 0
printf "Slot %d →\n", $i
__pxdllist $ht->table[$i]
printf "\n"
end
set $i = $i 1
end
end
define pxdset
set $s = (xdebug_set*) $arg0
printf "Set: size: %d: ", $s->size
set $i = 0
while $i < $s->size
set $byte = &($s->setinfo[$i / 8])
set $bit = $i % 8
if (*$byte & (1 << $bit))
printf "{%d} ", $i
end
set $i = $i 1
end
printf "\n"
end
set $xg = ((zend_xdebug_globals*) (*((void ***) tsrm_get_ls_cache()))[xdebug_globals_id-1])