|
|
|
@ -236,7 +236,7 @@ static PHPDBG_COMMAND(print) /* {{{ */ |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
printf("--------------------------------------\n"); |
|
|
|
PHPDBG_SEP_LINE(TSRMLS_C); |
|
|
|
printf("Execution Context Information:\n"); |
|
|
|
#ifdef HAVE_LIBREADLINE |
|
|
|
printf("Readline\tyes\n"); |
|
|
|
@ -266,84 +266,13 @@ static PHPDBG_COMMAND(print) /* {{{ */ |
|
|
|
printf("Constants\t%d\n", zend_hash_num_elements(EG(zend_constants))); |
|
|
|
printf("Included\t%d\n", zend_hash_num_elements(&EG(included_files))); |
|
|
|
|
|
|
|
if ((PHPDBG_G(flags) & PHPDBG_HAS_FILE_BP)) { |
|
|
|
HashPosition position; |
|
|
|
zend_llist *points; |
|
|
|
|
|
|
|
printf("--------------------------------------\n"); |
|
|
|
printf("File Breakpoints:\n"); |
|
|
|
for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], &position); |
|
|
|
zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], (void**) &points, &position) == SUCCESS; |
|
|
|
zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], &position)) { |
|
|
|
zend_llist_position lposition; |
|
|
|
phpdbg_breakfile_t *brake; |
|
|
|
|
|
|
|
if ((brake = zend_llist_get_first_ex(points, &lposition))) { |
|
|
|
do { |
|
|
|
printf("#%d\t\t%s:%lu\n", brake->id, brake->filename, brake->line); |
|
|
|
} while ((brake = zend_llist_get_next_ex(points, &lposition))); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
phpdbg_print_breakpoints(PHPDBG_BREAK_FILE TSRMLS_CC); |
|
|
|
phpdbg_print_breakpoints(PHPDBG_BREAK_SYM TSRMLS_CC); |
|
|
|
phpdbg_print_breakpoints(PHPDBG_BREAK_METHOD TSRMLS_CC); |
|
|
|
phpdbg_print_breakpoints(PHPDBG_BREAK_OPLINE TSRMLS_CC); |
|
|
|
|
|
|
|
if ((PHPDBG_G(flags) & PHPDBG_HAS_SYM_BP)) { |
|
|
|
HashPosition position; |
|
|
|
phpdbg_breaksymbol_t *brake; |
|
|
|
|
|
|
|
printf("--------------------------------------\n"); |
|
|
|
printf("Function Breakpoints:\n"); |
|
|
|
for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], &position); |
|
|
|
zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], (void**) &brake, &position) == SUCCESS; |
|
|
|
zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], &position)) { |
|
|
|
printf( |
|
|
|
"#%d\t\t%s\n", brake->id, brake->symbol); |
|
|
|
} |
|
|
|
} |
|
|
|
PHPDBG_SEP_LINE(TSRMLS_C); |
|
|
|
|
|
|
|
if ((PHPDBG_G(flags) & PHPDBG_HAS_METHOD_BP)) { |
|
|
|
HashPosition position[2]; |
|
|
|
HashTable *class_table; |
|
|
|
char *class_name = NULL; |
|
|
|
zend_uint class_len = 0; |
|
|
|
zend_ulong class_idx = 0L; |
|
|
|
|
|
|
|
printf("--------------------------------------\n"); |
|
|
|
printf("Method Breakpoints:\n"); |
|
|
|
for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], &position[0]); |
|
|
|
zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], (void**) &class_table, &position[0]) == SUCCESS; |
|
|
|
zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], &position[0])) { |
|
|
|
|
|
|
|
if (zend_hash_get_current_key_ex( |
|
|
|
&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], |
|
|
|
&class_name, &class_len, &class_idx, 0, &position[0]) == HASH_KEY_IS_STRING) { |
|
|
|
|
|
|
|
phpdbg_breakmethod_t *brake; |
|
|
|
|
|
|
|
for (zend_hash_internal_pointer_reset_ex(class_table, &position[1]); |
|
|
|
zend_hash_get_current_data_ex(class_table, (void**)&brake, &position[1]) == SUCCESS; |
|
|
|
zend_hash_move_forward_ex(class_table, &position[1])) { |
|
|
|
printf( |
|
|
|
"#%d\t\t%s::%s\n", brake->id, brake->class_name, brake->func_name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ((PHPDBG_G(flags) & PHPDBG_HAS_OPLINE_BP)) { |
|
|
|
HashPosition position; |
|
|
|
phpdbg_breakline_t *brake; |
|
|
|
|
|
|
|
printf("--------------------------------------\n"); |
|
|
|
printf("Opline Breakpoints:\n"); |
|
|
|
for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], &position); |
|
|
|
zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (void**) &brake, &position) == SUCCESS; |
|
|
|
zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], &position)) { |
|
|
|
printf("#%d\t\t%p\n", brake->id, brake->opline); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
printf("--------------------------------------\n"); |
|
|
|
return SUCCESS; |
|
|
|
} /* }}} */ |
|
|
|
|
|
|
|
|