diff options
author | krakjoe <joe.watkins@live.co.uk> | 2013-11-25 18:27:58 +0000 |
---|---|---|
committer | krakjoe <joe.watkins@live.co.uk> | 2013-11-25 18:27:58 +0000 |
commit | 754fe822161a929ba17c8aba72029bdb6d46236e (patch) | |
tree | 3dffbcd015eb0099c1c1701eca124f86070aff2b | |
parent | ba37fd24bc7e394476d7be11bed244621b5aad22 (diff) | |
download | php-git-754fe822161a929ba17c8aba72029bdb6d46236e.tar.gz |
export opcode breakpoints
-rw-r--r-- | phpdbg_bp.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/phpdbg_bp.c b/phpdbg_bp.c index 182991fe9f..de9b90d6db 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; } |