com php-src: export opcode breakpoints: phpdbg_bp.c
| From: | Bob Weinand | Date: | Mon, 25 Nov 2013 18:27:58 +0000 |
| Subject: | com php-src: export opcode breakpoints: phpdbg_bp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74586@lists.php.net to get a copy of this message | ||
Commit: 754fe822161a929ba17c8aba72029bdb6d46236e
Author: krakjoe <joe.watkins@live.co.uk> Mon, 25 Nov 2013 18:27:58 +0000
Parents: ba37fd24bc7e394476d7be11bed244621b5aad22
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=754fe822161a929ba17c8aba72029bdb6d46236e
Log:
export opcode breakpoints
Changed paths:
M phpdbg_bp.c
Diff:
diff --git a/phpdbg_bp.c b/phpdbg_bp.c
index 182991f..de9b90d 100644
--- a/phpdbg_bp.c
+++ b/phpdbg_bp.c
@@ -88,20 +88,20 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */
handle, "break %s\n", brake->symbol);
}
}
-
+
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)) {
@@ -118,6 +118,23 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */
}
}
+ if (PHPDBG_G(flags) & PHPDBG_HAS_OPCODE_BP) {
+ phpdbg_breakop_t *brake;
+
+ table = &PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE];
+
+ phpdbg_notice(
+ "Exporting opcode 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 op %s\n", brake->name);
+ }
+ }
+
/* export other types here after resolving errors from source command */
} /* }}} */
@@ -245,6 +262,8 @@ PHPDBG_API void phpdbg_set_breakpoint_opcode(const char *name, size_t name_len T
zend_ulong hash = zend_hash_func(name, name_len);
if (zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], hash)) {
+ phpdbg_notice(
+ "Breakpoint exists for %s", name);
return;
}