summaryrefslogtreecommitdiff
path: root/phpdbg_list.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-02-19 20:18:49 +0000
committerkrakjoe <joe.watkins@live.co.uk>2014-02-19 20:18:49 +0000
commite2fcc870e34510dc4cc47ad69d77b28ae9eb21df (patch)
treed70f3f3a86398c0c1715a184af7a3c8ae7e6c7f7 /phpdbg_list.c
parent996182993da1c35e8c35a3188b4c1adb764320f8 (diff)
downloadphp-git-e2fcc870e34510dc4cc47ad69d77b28ae9eb21df.tar.gz
work on lexer to be more permissive (accept moar strings)
work on parameter parsing and command resolution work on error reporting for failed arguments update most commands move quiet to set quiet move set break on/off to set breaks on/off keep set break for set break <id> <on/off> update help accordingly
Diffstat (limited to 'phpdbg_list.c')
-rw-r--r--phpdbg_list.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/phpdbg_list.c b/phpdbg_list.c
index a1bd8c0ff5..6037714292 100644
--- a/phpdbg_list.c
+++ b/phpdbg_list.c
@@ -29,14 +29,18 @@
#include "phpdbg.h"
#include "phpdbg_list.h"
#include "phpdbg_utils.h"
+#include "phpdbg_prompt.h"
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+#define PHPDBG_LIST_COMMAND_D(f, h, a, m, l, s) \
+ PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[13])
+
const phpdbg_command_t phpdbg_list_commands[] = {
- PHPDBG_COMMAND_D_EX(lines, "lists the specified lines", 'l', list_lines, NULL, "l"),
- PHPDBG_COMMAND_D_EX(class, "lists the specified class", 'c', list_class, NULL, "s"),
- PHPDBG_COMMAND_D_EX(method, "lists the specified method", 'm', list_method, NULL, "m"),
- PHPDBG_COMMAND_D_EX(func, "lists the specified function", 'f', list_func, NULL, "s"),
+ PHPDBG_LIST_COMMAND_D(lines, "lists the specified lines", 'l', list_lines, NULL, "l"),
+ PHPDBG_LIST_COMMAND_D(class, "lists the specified class", 'c', list_class, NULL, "s"),
+ PHPDBG_LIST_COMMAND_D(method, "lists the specified method", 'm', list_method, NULL, "m"),
+ PHPDBG_LIST_COMMAND_D(func, "lists the specified function", 'f', list_func, NULL, "s"),
PHPDBG_END_COMMAND
};
@@ -49,12 +53,12 @@ PHPDBG_LIST(lines) /* {{{ */
switch (param->type) {
case NUMERIC_PARAM:
- case EMPTY_PARAM:
phpdbg_list_file(phpdbg_current_file(TSRMLS_C),
- param->type == EMPTY_PARAM ? 0 : (param->num < 0 ? 1 - param->num : param->num),
- (param->type != EMPTY_PARAM && param->num < 0 ? param->num : 0) + zend_get_executed_lineno(TSRMLS_C),
+ (param->num < 0 ? 1 - param->num : param->num),
+ (param->num < 0 ? param->num : 0) + zend_get_executed_lineno(TSRMLS_C),
0 TSRMLS_CC);
break;
+
case FILE_PARAM:
phpdbg_list_file(param->file.name, param->file.line, 0, 0 TSRMLS_CC);
break;