summaryrefslogtreecommitdiff
path: root/phpdbg_bp.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2013-11-26 09:21:04 +0100
committerBob Weinand <bobwei9@hotmail.com>2013-11-26 09:21:04 +0100
commit485966252a200f53704e9156fff5f816798ef465 (patch)
tree7983ac4ca1e0e352446bce12f45660286725ae62 /phpdbg_bp.c
parentbc7df607ab2d7771a3c2226b46598645e67e053f (diff)
downloadphp-git-485966252a200f53704e9156fff5f816798ef465.tar.gz
Export conditional breaks
Diffstat (limited to 'phpdbg_bp.c')
-rw-r--r--phpdbg_bp.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/phpdbg_bp.c b/phpdbg_bp.c
index 40a3a50fc7..3fe4169b75 100644
--- a/phpdbg_bp.c
+++ b/phpdbg_bp.c
@@ -59,8 +59,8 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */
zend_hash_move_forward_ex(table, &position)) {
zend_llist_position lposition;
- phpdbg_breakfile_t *brake;
- zend_ulong count = zend_llist_count(brakes);
+ phpdbg_breakfile_t *brake;
+ int count = zend_llist_count(brakes);
if ((brake = zend_llist_get_first_ex(brakes, &lposition))) {
phpdbg_notice(
@@ -134,8 +134,22 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */
}
}
- /* export other types here after resolving errors from source command */
+ if (PHPDBG_G(flags) & PHPDBG_HAS_COND_BP) {
+ phpdbg_breakcond_t *brake;
+
+ table = &PHPDBG_G(bp)[PHPDBG_BREAK_COND];
+
+ phpdbg_notice(
+ "Exporting conditional breakpoints (%d)", zend_hash_num_elements(table));
+
+ for (zend_hash_internal_pointer_reset_ex(table, &position);
+ zend_hash_get_current_data_ex(table, (void**) &brake, &position) == SUCCESS;
+ zend_hash_move_forward_ex(table, &position)) {
+ fprintf(
+ handle, "break on %s\n", Z_STRVAL(brake->code));
+ }
+ }
} /* }}} */
PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num TSRMLS_DC) /* {{{ */