summaryrefslogtreecommitdiff
path: root/phpdbg_bp.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2013-11-25 18:16:31 +0000
committerkrakjoe <joe.watkins@live.co.uk>2013-11-25 18:16:31 +0000
commitba37fd24bc7e394476d7be11bed244621b5aad22 (patch)
tree3ab23ac97bce61a86f72a2012ec8117ecd2aabf0 /phpdbg_bp.c
parent3e14ff7cee168c6915883ed5fdd81c1d7f5fa5e7 (diff)
downloadphp-git-ba37fd24bc7e394476d7be11bed244621b5aad22.tar.gz
export method breakpoints
Diffstat (limited to 'phpdbg_bp.c')
-rw-r--r--phpdbg_bp.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/phpdbg_bp.c b/phpdbg_bp.c
index fb61cf8ab7..182991fe9f 100644
--- a/phpdbg_bp.c
+++ b/phpdbg_bp.c
@@ -89,6 +89,35 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */
}
}
+ if (PHPDBG_G(flags) & PHPDBG_HAS_METHOD_BP) {
+ HashTable *class;
+ phpdbg_breakmethod_t *brake;
+ HashPosition mposition;
+ zend_bool noted = 0;
+
+ table = &PHPDBG_G(bp)[PHPDBG_BREAK_METHOD];
+
+ for (zend_hash_internal_pointer_reset_ex(table, &position);
+ zend_hash_get_current_data_ex(table, (void**) &class, &position) == SUCCESS;
+ zend_hash_move_forward_ex(table, &position)) {
+ noted = 0;
+
+ for (zend_hash_internal_pointer_reset_ex(class, &mposition);
+ zend_hash_get_current_data_ex(class, (void**) &brake, &mposition) == SUCCESS;
+ zend_hash_move_forward_ex(class, &mposition)) {
+ if (!noted) {
+ phpdbg_notice(
+ "Exporting method breakpoints in %s (%d)",
+ brake->class_name, zend_hash_num_elements(class));
+ noted = 1;
+ }
+
+ fprintf(
+ handle, "break %s::%s\n", brake->class_name, brake->func_name);
+ }
+ }
+ }
+
/* export other types here after resolving errors from source command */
} /* }}} */