summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorDylan K. Taylor <odigiman@gmail.com>2021-01-04 23:13:00 +0000
committerNikita Popov <nikita.ppv@gmail.com>2021-01-05 10:11:56 +0100
commit6b631f073d6843c8c9fa7932c4ad8ab3d70c42a4 (patch)
tree9dc6286ea03ffeb346cfb10d665db0458623412c /.gdbinit
parent46d6daea7aaf04ae85634c99252ab924ef6c34c3 (diff)
downloadphp-git-6b631f073d6843c8c9fa7932c4ad8ab3d70c42a4.tar.gz
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.
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gdbinit b/.gdbinit
index 8e54830ef2..a163bcc473 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -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