Skip to content

Commit 6b631f0

Browse files
dktappsnikic
authored andcommitted
gdbinit: use ____print_str to print htable keys
I noticed this problem while dumping the contents of EG(function_table), where keys for closures start with a null byte. printf interprets this as a zero-length string and emits nothing. This allows the key to be rendered properly in readable form. Closes phpGH-6577.
1 parent 46d6dae commit 6b631f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.gdbinit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ define ____print_ht
352352
end
353353
printf "[%d] ", $i
354354
if $p->key
355-
printf "%s => ", $p->key->val
355+
____print_str $p->key->val $p->key->len
356+
printf " => "
356357
else
357358
printf "%d => ", $p->h
358359
end

0 commit comments

Comments
 (0)