Browse Source

export opcode breakpoints

pull/550/head
krakjoe 13 years ago
parent
commit
754fe82216
  1. 27
      phpdbg_bp.c

27
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;
}

Loading…
Cancel
Save