]> granicus.if.org Git - php/commitdiff
Fix accidental PHPDBG_ABI break
authorBob Weinand <bobwei9@hotmail.com>
Wed, 12 Oct 2016 20:16:11 +0000 (22:16 +0200)
committerAnatol Belski <ab@php.net>
Thu, 13 Oct 2016 23:50:48 +0000 (01:50 +0200)
(cherry picked from commit 671d8054f85d2dec1a00201a73ab792847c13919)

sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg_bp.c
sapi/phpdbg/phpdbg_bp.h
sapi/phpdbg/phpdbg_prompt.c

index be50de80708c641599ec298c289d44e5f32ca5eb..f4b427330236ca81d2176665d896acf568d8a8fe 100644 (file)
@@ -374,7 +374,7 @@ static PHP_FUNCTION(phpdbg_break_file)
                return;
        }
 
-       phpdbg_set_breakpoint_file(file, 0, line);
+       phpdbg_set_breakpoint_file(file, line);
 } /* }}} */
 
 /* {{{ proto void phpdbg_break_method(string class, string method) */
index da4c8f71bf38d5379aec26c5d0ae7897ec358d2d..a690a77af805a58f225ce37294f48061db1550ee 100644 (file)
@@ -230,7 +230,12 @@ PHPDBG_API void phpdbg_export_breakpoints_to_string(char **str) /* {{{ */
        }
 } /* }}} */
 
-PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, long line_num) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {{{ */
+{
+       phpdbg_set_breakpoint_file_ex(path, 0, line_num);
+} /* }}} */
+
+PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char *path, size_t path_len, long line_num) /* {{{ */
 {
        php_stream_statbuf ssb;
        char realpath[MAXPATHLEN];
index 7daafe48c1a197ecb5b2bbe528394e161a305d2b..b44d5ec74ebbf52e6f76a7d1acccc2663f63a770 100644 (file)
@@ -125,7 +125,8 @@ PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uin
 PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file); /* }}} */
 
 /* {{{ Breakpoint Creation API */
-PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, size_t path_len, long lineno);
+PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, long lineno);
+PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char* filename, size_t path_len, long lineno);
 PHPDBG_API void phpdbg_set_breakpoint_symbol(const char* func_name, size_t func_name_len);
 PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name);
 PHPDBG_API void phpdbg_set_breakpoint_opcode(const char* opname, size_t opname_len);
index 367d7ef93d343c726aa711d17c514ff8ef76561c..c6115e7d00445a77d46fc41e6b28f64b61bdb3f3 100644 (file)
@@ -1175,7 +1175,7 @@ PHPDBG_COMMAND(break) /* {{{ */
 {
        if (!param) {
                if (PHPDBG_G(exec)) {
-                       phpdbg_set_breakpoint_file(
+                       phpdbg_set_breakpoint_file_ex(
                                zend_get_executed_filename(),
                                strlen(zend_get_executed_filename()),
                                zend_get_executed_lineno());
@@ -1188,7 +1188,7 @@ PHPDBG_COMMAND(break) /* {{{ */
                        break;
                case NUMERIC_PARAM:
                        if (PHPDBG_G(exec)) {
-                               phpdbg_set_breakpoint_file(phpdbg_current_file(), strlen(phpdbg_current_file()), param->num);
+                               phpdbg_set_breakpoint_file_ex(phpdbg_current_file(), strlen(phpdbg_current_file()), param->num);
                        } else {
                                phpdbg_error("inactive", "type=\"noexec\"", "Execution context not set!");
                        }
@@ -1203,7 +1203,7 @@ PHPDBG_COMMAND(break) /* {{{ */
                        phpdbg_set_breakpoint_function_opline(param->str, param->num);
                        break;
                case FILE_PARAM:
-                       phpdbg_set_breakpoint_file(param->file.name, 0, param->file.line);
+                       phpdbg_set_breakpoint_file(param->file.name, param->file.line);
                        break;
                case NUMERIC_FILE_PARAM:
                        phpdbg_set_breakpoint_file_opline(param->file.name, param->file.line);