From 4283b125c9b63a57283a28d70614b342d6c3fe75 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Thu, 14 Nov 2013 12:25:19 +0000 Subject: [PATCH 1/2] alias printing commands --- phpdbg_print.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpdbg_print.h b/phpdbg_print.h index 7e48f7b4dda..68e1f5e7696 100644 --- a/phpdbg_print.h +++ b/phpdbg_print.h @@ -26,8 +26,8 @@ /** * Command Declarators */ -#define PHPDBG_PRINT_D(name, tip) \ - {PHPDBG_STRL(#name), tip, sizeof(tip)-1, 0, phpdbg_do_print_##name} +#define PHPDBG_PRINT_D(name, tip, alias) \ + {PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, phpdbg_do_print_##name} #define PHPDBG_PRINT(name) \ int phpdbg_do_print_##name(const char *expr, size_t expr_len TSRMLS_DC) @@ -43,10 +43,10 @@ PHPDBG_PRINT(func); * Commands */ static const phpdbg_command_t phpdbg_print_commands[] = { - PHPDBG_PRINT_D(opline, "print the current opline information"), - PHPDBG_PRINT_D(class, "print out the instructions in the specified class"), - PHPDBG_PRINT_D(method, "print out the instructions in the specified method"), - PHPDBG_PRINT_D(func, "print out the instructions in the specified function"), + PHPDBG_PRINT_D(opline, "print the current opline information", 'o'), + PHPDBG_PRINT_D(class, "print out the instructions in the specified class", 'c'), + PHPDBG_PRINT_D(method, "print out the instructions in the specified method", 'm'), + PHPDBG_PRINT_D(func, "print out the instructions in the specified function", 'f'), {0, 0, 0, 0} }; From 187d1c726bc58ff001ed4baf29b76de28a3e92fe Mon Sep 17 00:00:00 2001 From: krakjoe Date: Thu, 14 Nov 2013 12:29:23 +0000 Subject: [PATCH 2/2] fix duplicate message on print .func if no active class --- phpdbg_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpdbg_print.c b/phpdbg_print.c index f337de043da..ca552553157 100644 --- a/phpdbg_print.c +++ b/phpdbg_print.c @@ -178,7 +178,7 @@ PHPDBG_PRINT(func) /* {{{ */ func_table = &EG(scope)->function_table; } else { phpdbg_error("No active class"); - return FAILURE; + return SUCCESS; } } else if (!EG(function_table)) { phpdbg_error("No function table loaded");