summaryrefslogtreecommitdiff
path: root/phpdbg_prompt.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-04-13 08:34:16 +0100
committerkrakjoe <joe.watkins@live.co.uk>2014-04-13 08:34:16 +0100
commit4387723ef779135dfdaf36f1a3f451ca4c564877 (patch)
treee92a83a87143f5761d20c17bc633e2f3fd634cd4 /phpdbg_prompt.c
parent65984df220c494e431fa148f437115ca02cb7d39 (diff)
downloadphp-git-4387723ef779135dfdaf36f1a3f451ca4c564877.tar.gz
fix argc/argv
Diffstat (limited to 'phpdbg_prompt.c')
-rw-r--r--phpdbg_prompt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 373260c1d1..85f22ca9b5 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -191,7 +191,9 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack TSRMLS_DC) /* {{{ *
void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init TSRMLS_DC) /* {{{ */
{
struct stat sb;
-
+
+ printf("try %s\n", init_file);
+
if (init_file && VCWD_STAT(init_file, &sb) != -1) {
FILE *fp = fopen(init_file, "r");
if (fp) {
@@ -304,7 +306,7 @@ next_line:
if (free_init) {
free(init_file);
}
- }
+ } else printf("failed to open %s\n", init_file);
} /* }}} */
void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default TSRMLS_DC) /* {{{ */
@@ -648,7 +650,8 @@ PHPDBG_COMMAND(run) /* {{{ */
char **argv = emalloc(5 * sizeof(char *));
int argc = 0;
int i;
- char *argv_str = strtok(input->string, " ");
+ char *argv_str = NULL;
+ printf("param->str: %s\n", param->str);
while (argv_str) {
if (argc >= 4 && argc == (argc & -argc)) {
argv = erealloc(argv, (argc * 2 + 1) * sizeof(char *));