From b41cde1476d3af118454ffbb6541780b8c4ee32b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 4 Jan 2021 23:13:00 +0000 Subject: [PATCH] gdbinit: use ____print_str to print htable keys instead of printf 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. --- .gdbinit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gdbinit b/.gdbinit index be901f80a2f29..a5d4386c9a4ba 100644 --- a/.gdbinit +++ b/.gdbinit @@ -340,7 +340,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