summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_btree.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-10-24 19:29:50 +0200
committerBob Weinand <bobwei9@hotmail.com>2014-10-24 19:29:50 +0200
commit2bcac53bca8ea82d661f057b6d9ff3c7c84f05a7 (patch)
tree681b32fe3d9d342c0461c2641b2d651f095b06f8 /sapi/phpdbg/phpdbg_btree.c
parent53560ca06b333b71883269091f7d74c0a25e087b (diff)
parentc03ac47bafd0ea55055a2f3d4de0bc6bb4d98d8d (diff)
downloadphp-git-2bcac53bca8ea82d661f057b6d9ff3c7c84f05a7.tar.gz
Made phpdbg compatible with new engine
Diffstat (limited to 'sapi/phpdbg/phpdbg_btree.c')
-rw-r--r--sapi/phpdbg/phpdbg_btree.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_btree.c b/sapi/phpdbg/phpdbg_btree.c
index a155efbf9a..918bc0d68f 100644
--- a/sapi/phpdbg/phpdbg_btree.c
+++ b/sapi/phpdbg/phpdbg_btree.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
+ | PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -219,3 +219,18 @@ check_branch_existence:
return SUCCESS;
}
+
+void phpdbg_btree_branch_dump(phpdbg_btree_branch *branch, zend_ulong depth) {
+ if (branch) {
+ if (depth--) {
+ phpdbg_btree_branch_dump(branch->branches[0], depth);
+ phpdbg_btree_branch_dump(branch->branches[1], depth);
+ } else {
+ fprintf(stderr, "%p: %p\n", (void *) branch->result.idx, branch->result.ptr);
+ }
+ }
+}
+
+void phpdbg_btree_dump(phpdbg_btree *tree) {
+ phpdbg_btree_branch_dump(tree->branch, tree->depth);
+}