diff options
Diffstat (limited to 'sapi/phpdbg')
| -rw-r--r-- | sapi/phpdbg/phpdbg.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_bp.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_break.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_eol.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_frame.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_help.c | 8 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_info.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_io.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_lexer.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_lexer.l | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 9 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_opcode.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_out.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_parser.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_parser.y | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_print.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 7 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_set.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_sigio_win32.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_sigsafe.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_utils.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_wait.c | 7 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_watch.c | 2 |
24 files changed, 37 insertions, 34 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 9321eed2d3..68a164c499 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -53,7 +53,7 @@ #endif #if defined(PHP_WIN32) && defined(ZTS) -ZEND_TSRMLS_CACHE_DEFINE(); +ZEND_TSRMLS_CACHE_DEFINE() #endif ZEND_DECLARE_MODULE_GLOBALS(phpdbg); diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index 5436bda5db..4cb1dae42c 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -26,7 +26,7 @@ #include "phpdbg_opcode.h" #include "zend_globals.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* {{{ private api functions */ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_file(zend_op_array*); diff --git a/sapi/phpdbg/phpdbg_break.c b/sapi/phpdbg/phpdbg_break.c index 72739c117c..0640d96fd8 100644 --- a/sapi/phpdbg/phpdbg_break.c +++ b/sapi/phpdbg/phpdbg_break.c @@ -26,7 +26,7 @@ #include "phpdbg_bp.h" #include "phpdbg_prompt.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define PHPDBG_BREAK_COMMAND_D(f, h, a, m, l, s, flags) \ PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[9], flags) diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 3497274428..f89e58a13c 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -25,7 +25,7 @@ #include "phpdbg_prompt.h" #include "phpdbg_io.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) static inline const char *phpdbg_command_name(const phpdbg_command_t *command, char *buffer) { size_t pos = 0; diff --git a/sapi/phpdbg/phpdbg_eol.c b/sapi/phpdbg/phpdbg_eol.c index 161a2dd74b..eaf9997fb4 100644 --- a/sapi/phpdbg/phpdbg_eol.c +++ b/sapi/phpdbg/phpdbg_eol.c @@ -23,7 +23,7 @@ #include "phpdbg.h" #include "phpdbg_eol.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define EOL_LIST_LEN 4 struct phpdbg_eol_rep phpdbg_eol_list[EOL_LIST_LEN] = { diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index ab1b554f76..d6256a84af 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -24,7 +24,7 @@ #include "phpdbg_frame.h" #include "phpdbg_list.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) void phpdbg_restore_frame(void) /* {{{ */ { diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index ff16b49b34..d01184b102 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -25,7 +25,7 @@ #include "phpdbg_eol.h" #include "zend.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* {{{ Commands Table */ #define PHPDBG_COMMAND_HELP_D(name, tip, alias, action) \ @@ -809,9 +809,11 @@ phpdbg_help_text_t phpdbg_help_text[] = { }, {"run", -"Enter the vm, startinging execution. Execution will then continue until the next breakpoint " -"or completion of the script. Add parameters you want to use as $argv" +"Enter the vm, starting execution. Execution will then continue until the next breakpoint " +"or completion of the script. Add parameters you want to use as $argv" CR CR + "**Examples**" CR CR + " $P run" CR " $P r" CR " Will cause execution of the context, if it is set" CR CR diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c index 5d7608fa76..ddd8229c08 100644 --- a/sapi/phpdbg/phpdbg_info.c +++ b/sapi/phpdbg/phpdbg_info.c @@ -25,7 +25,7 @@ #include "phpdbg_bp.h" #include "phpdbg_prompt.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define PHPDBG_INFO_COMMAND_D(f, h, a, m, l, s, flags) \ PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[13], flags) diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c index 2e41bdd4fb..b2f4ba7c0d 100644 --- a/sapi/phpdbg/phpdbg_io.c +++ b/sapi/phpdbg/phpdbg_io.c @@ -45,7 +45,7 @@ #include <poll.h> #endif -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* is easy to generalize ... but not needed for now */ PHPDBG_API int phpdbg_consume_stdin_line(char *buf) { diff --git a/sapi/phpdbg/phpdbg_lexer.c b/sapi/phpdbg/phpdbg_lexer.c index 36c6f422bd..10af103fb0 100644 --- a/sapi/phpdbg/phpdbg_lexer.c +++ b/sapi/phpdbg/phpdbg_lexer.c @@ -28,7 +28,7 @@ #define RAW 2 #define INITIAL 3 -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) { PHPDBG_G(parser_stack) = stack; diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l index 5d1c8b77ba..21c4569480 100644 --- a/sapi/phpdbg/phpdbg_lexer.l +++ b/sapi/phpdbg/phpdbg_lexer.l @@ -26,7 +26,7 @@ #define RAW 2 #define INITIAL 3 -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) { PHPDBG_G(parser_stack) = stack; diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index 8bcf6c362b..6895bea43e 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -33,7 +33,7 @@ #include "php_streams.h" #include "zend_exceptions.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define PHPDBG_LIST_COMMAND_D(f, h, a, m, l, s, flags) \ PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[12], flags) @@ -232,6 +232,7 @@ void phpdbg_list_function_byname(const char *str, size_t len) /* {{{ */ efree(func_name); } /* }}} */ +/* Note: do not free the original file handler, let original compile_file() or caller do that. Caller may rely on its value to check success */ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { phpdbg_file_source data, *dataptr; zend_file_handle fake; @@ -242,7 +243,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { char resolved_path_buf[MAXPATHLEN]; if (zend_stream_fixup(file, &bufptr, &data.len) == FAILURE) { - return NULL; + return PHPDBG_G(compile_file)(file, type); } data.buf = emalloc(data.len + ZEND_MMAP_AHEAD + 1); @@ -279,6 +280,10 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { if (ret == NULL) { efree(data.buf); efree(dataptr); + + fake.opened_path = NULL; + zend_file_handle_dtor(&fake); + return NULL; } diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index 0ea4324845..e64ab0d636 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -25,7 +25,7 @@ #include "phpdbg_utils.h" #include "ext/standard/php_string.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) static inline const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */ { diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c index 912e9e8092..90940ca68c 100644 --- a/sapi/phpdbg/phpdbg_out.c +++ b/sapi/phpdbg/phpdbg_out.c @@ -30,7 +30,7 @@ # include "win32/time.h" #endif -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* copied from php-src/main/snprintf.c and slightly modified */ /* diff --git a/sapi/phpdbg/phpdbg_parser.c b/sapi/phpdbg/phpdbg_parser.c index 8a33a10780..c5222a0289 100644 --- a/sapi/phpdbg/phpdbg_parser.c +++ b/sapi/phpdbg/phpdbg_parser.c @@ -94,7 +94,7 @@ #undef yyerror static int yyerror(const char *msg); -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #ifdef _MSC_VER #define YYMALLOC malloc diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y index 2b8f357763..df9be36eee 100644 --- a/sapi/phpdbg/phpdbg_parser.y +++ b/sapi/phpdbg/phpdbg_parser.y @@ -21,7 +21,7 @@ #undef yyerror static int yyerror(const char *msg); -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #ifdef _MSC_VER #define YYMALLOC malloc diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c index 00209cb239..3725bf6083 100644 --- a/sapi/phpdbg/phpdbg_print.c +++ b/sapi/phpdbg/phpdbg_print.c @@ -24,7 +24,7 @@ #include "phpdbg_opcode.h" #include "phpdbg_prompt.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define PHPDBG_PRINT_COMMAND_D(f, h, a, m, l, s, flags) \ PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[8], flags) diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 558ca469b5..6f73d3087a 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -48,7 +48,7 @@ #error "phpdbg can only be built with CALL zend vm kind" #endif -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) extern int phpdbg_startup_run; #ifdef HAVE_LIBDL @@ -121,7 +121,8 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */ ZVAL_STRINGL(&fci.function_name, lc_name, name->len); fci.size = sizeof(zend_fcall_info); fci.function_table = &PHPDBG_G(registered); - fci.symbol_table = zend_rebuild_symbol_table(); + //???fci.symbol_table = zend_rebuild_symbol_table(); + fci.symbol_table = NULL; fci.object = NULL; fci.retval = &fretval; fci.no_separation = 1; @@ -1047,7 +1048,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name) if (!handle) { #if PHP_WIN32 char *err = GET_DL_ERROR(); - if (err && *err != "") { + if (err && err[0]) { phpdbg_error("dl", "type=\"unknown\"", "%s", err); LocalFree(err); } else { diff --git a/sapi/phpdbg/phpdbg_set.c b/sapi/phpdbg/phpdbg_set.c index dd78b78697..47ecbd08b6 100644 --- a/sapi/phpdbg/phpdbg_set.c +++ b/sapi/phpdbg/phpdbg_set.c @@ -25,7 +25,7 @@ #include "phpdbg_bp.h" #include "phpdbg_prompt.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define PHPDBG_SET_COMMAND_D(f, h, a, m, l, s, flags) \ PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[17], flags) diff --git a/sapi/phpdbg/phpdbg_sigio_win32.c b/sapi/phpdbg/phpdbg_sigio_win32.c index 5183d1fb66..db334a0dc5 100644 --- a/sapi/phpdbg/phpdbg_sigio_win32.c +++ b/sapi/phpdbg/phpdbg_sigio_win32.c @@ -23,7 +23,7 @@ #include "phpdbg_sigio_win32.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) VOID diff --git a/sapi/phpdbg/phpdbg_sigsafe.c b/sapi/phpdbg/phpdbg_sigsafe.c index 54af08ec5b..2f987b3a15 100644 --- a/sapi/phpdbg/phpdbg_sigsafe.c +++ b/sapi/phpdbg/phpdbg_sigsafe.c @@ -1,7 +1,7 @@ #include "phpdbg_sigsafe.h" #include "phpdbg.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) #define STR(x) #x #define EXP_STR(x) STR(x) diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index a944d256ae..7158f3ba6c 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -38,7 +38,7 @@ # endif #endif -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) /* {{{ color structures */ const static phpdbg_color_t colors[] = { diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index c3ae23b7cd..c7dcd4fbd4 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -21,7 +21,7 @@ #include "ext/standard/php_var.h" #include "ext/standard/basic_functions.h" -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) static void phpdbg_rebuild_http_globals_array(int type, const char *name) { zval *zvp; @@ -281,11 +281,6 @@ void phpdbg_webdata_decompress(char *msg, int len) { pefree(elm, zend_extensions.persistent); zend_extensions.count--; } else { -/* zend_hash_get_current_key_zval_ex(Z_ARRVAL_PP(zvpp), &key, &hpos); - if (Z_TYPE(key) == IS_LONG) { - zend_hash_index_del(Z_ARRVAL_PP(zvpp), Z_LVAL(key)); - } -*/ zend_hash_del(Z_ARRVAL_P(zvp), strkey); } } diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index b1f3fee2ac..2c324aa5dc 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -80,7 +80,7 @@ # include <sys/mman.h> #endif -ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(phpdbg) const phpdbg_command_t phpdbg_watch_commands[] = { PHPDBG_COMMAND_D_EX(array, "create watchpoint on an array", 'a', watch_array, &phpdbg_prompt_commands[24], "s", 0), |
