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 GH-6577.
This commit is contained in:
Dylan K. Taylor 2021-01-04 23:13:00 +00:00 committed by Nikita Popov
parent 46d6daea7a
commit 6b631f073d

View File

@ -352,7 +352,8 @@ define ____print_ht
end
printf "[%d] ", $i
if $p->key
printf "%s => ", $p->key->val
____print_str $p->key->val $p->key->len
printf " => "
else
printf "%d => ", $p->h
end