Skip to content

Commit 7b44890

Browse files
committed
Merge pull request #73 from TerryE/new-help
New help updates
2 parents 0dc1072 + 21c973d commit 7b44890

18 files changed

+980
-720
lines changed

phpdbg.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,10 @@ const char phpdbg_ini_hardcoded[] =
614614

615615
/* overwriteable ini defaults must be set in phpdbg_ini_defaults() */
616616
#define INI_DEFAULT(name, value) \
617-
Z_SET_REFCOUNT(tmp, 0); \
618-
Z_UNSET_ISREF(tmp); \
619-
ZVAL_STRINGL(&tmp, zend_strndup(value, sizeof(value)-1), sizeof(value)-1, 0); \
620-
zend_hash_update(configuration_hash, name, sizeof(name), &tmp, sizeof(zval), NULL);
617+
Z_SET_REFCOUNT(tmp, 0); \
618+
Z_UNSET_ISREF(tmp); \
619+
ZVAL_STRINGL(&tmp, zend_strndup(value, sizeof(value)-1), sizeof(value)-1, 0); \
620+
zend_hash_update(configuration_hash, name, sizeof(name), &tmp, sizeof(zval), NULL);
621621

622622
void phpdbg_ini_defaults(HashTable *configuration_hash) /* {{{ */
623623
{

phpdbg_bp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char
324324
PHPDBG_BREAK_MAPPING(new_break.id, class_table);
325325
} else {
326326
phpdbg_notice("Breakpoint exists at %s::%s", class_name, func_name);
327-
}
327+
}
328328

329-
efree(lcname);
329+
efree(lcname);
330330
} /* }}} */
331331

332332
PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC) /* {{{ */
@@ -992,7 +992,7 @@ static inline phpdbg_breakbase_t *phpdbg_find_conditional_breakpoint(zend_execut
992992

993993
for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], &position);
994994
zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], (void*)&bp, &position) == SUCCESS;
995-
zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], &position)) {
995+
zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], &position)) {
996996
zval *retval = NULL;
997997
int orig_interactive = CG(interactive);
998998
zval **orig_retval = EG(return_value_ptr_ptr);

phpdbg_break.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@
2727

2828
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
2929

30+
/**
31+
* Commands
32+
*/
33+
const phpdbg_command_t phpdbg_break_commands[] = {
34+
PHPDBG_COMMAND_D_EX(file, "specify breakpoint by file:line", 'F', break_file, NULL, 1),
35+
PHPDBG_COMMAND_D_EX(func, "specify breakpoint by global function name", 'f', break_func, NULL, 1),
36+
PHPDBG_COMMAND_D_EX(method, "specify breakpoint by class::method", 'm', break_method, NULL, 1),
37+
PHPDBG_COMMAND_D_EX(address, "specify breakpoint by address", 'a', break_address, NULL, 1),
38+
PHPDBG_COMMAND_D_EX(op, "specify breakpoint by opcode", 'O', break_op, NULL, 1),
39+
PHPDBG_COMMAND_D_EX(on, "specify breakpoint by condition", 'o', break_on, NULL, 1),
40+
PHPDBG_COMMAND_D_EX(at, "specify breakpoint by location and condition", 'A', break_at, NULL, 1),
41+
PHPDBG_COMMAND_D_EX(lineno, "specify breakpoint by line of currently executing file", 'l', break_lineno, NULL, 1),
42+
PHPDBG_COMMAND_D_EX(del, "delete breakpoint by identifier number", 'd', break_del, NULL, 1),
43+
PHPDBG_END_COMMAND
44+
};
45+
3046
PHPDBG_BREAK(file) /* {{{ */
3147
{
3248
switch (param->type) {

phpdbg_break.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ PHPDBG_BREAK(on);
3939
PHPDBG_BREAK(lineno);
4040
PHPDBG_BREAK(del);
4141

42-
/**
43-
* Commands
44-
*/
45-
static const phpdbg_command_t phpdbg_break_commands[] = {
46-
PHPDBG_COMMAND_D_EX(file, "specify breakpoint by file:line", 'F', break_file, NULL, 1),
47-
PHPDBG_COMMAND_D_EX(func, "specify breakpoint by global function name", 'f', break_func, NULL, 1),
48-
PHPDBG_COMMAND_D_EX(method, "specify breakpoint by class::method", 'm', break_method, NULL, 1),
49-
PHPDBG_COMMAND_D_EX(address, "specify breakpoint by address", 'a', break_address, NULL, 1),
50-
PHPDBG_COMMAND_D_EX(op, "specify breakpoint by opcode", 'O', break_op, NULL, 1),
51-
PHPDBG_COMMAND_D_EX(on, "specify breakpoint by condition", 'o', break_on, NULL, 1),
52-
PHPDBG_COMMAND_D_EX(at, "specify breakpoint by location and condition", 'A', break_at, NULL, 1),
53-
PHPDBG_COMMAND_D_EX(lineno, "specify breakpoint by line of currently executing file", 'l', break_lineno, NULL, 1),
54-
PHPDBG_COMMAND_D_EX(del, "delete breakpoint by identifier number", 'd', break_del, NULL, 1),
55-
PHPDBG_END_COMMAND
56-
};
42+
extern const phpdbg_command_t phpdbg_break_commands[];
5743

5844
#endif /* PHPDBG_BREAK_H */

0 commit comments

Comments
 (0)