Skip to content

Commit 671d805

Browse files
committed
Fix accidental PHPDBG_ABI break
1 parent c4c2cce commit 671d805

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

sapi/phpdbg/phpdbg.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ static PHP_FUNCTION(phpdbg_break_file)
341341
return;
342342
}
343343

344-
phpdbg_set_breakpoint_file(file, 0, line);
344+
phpdbg_set_breakpoint_file(file, line);
345345
} /* }}} */
346346

347347
/* {{{ proto void phpdbg_break_method(string class, string method) */

sapi/phpdbg/phpdbg_bp.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,12 @@ PHPDBG_API void phpdbg_export_breakpoints_to_string(char **str) /* {{{ */
230230
}
231231
} /* }}} */
232232

233-
PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, long line_num) /* {{{ */
233+
PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {{{ */
234+
{
235+
phpdbg_set_breakpoint_file_ex(path, 0, line_num);
236+
} /* }}} */
237+
238+
PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char *path, size_t path_len, long line_num) /* {{{ */
234239
{
235240
php_stream_statbuf ssb;
236241
char realpath[MAXPATHLEN];

sapi/phpdbg/phpdbg_bp.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uin
125125
PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file); /* }}} */
126126

127127
/* {{{ Breakpoint Creation API */
128-
PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, size_t path_len, long lineno);
128+
PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, long lineno);
129+
PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char* filename, size_t path_len, long lineno);
129130
PHPDBG_API void phpdbg_set_breakpoint_symbol(const char* func_name, size_t func_name_len);
130131
PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name);
131132
PHPDBG_API void phpdbg_set_breakpoint_opcode(const char* opname, size_t opname_len);

sapi/phpdbg/phpdbg_prompt.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ PHPDBG_COMMAND(break) /* {{{ */
11281128
{
11291129
if (!param) {
11301130
if (PHPDBG_G(exec)) {
1131-
phpdbg_set_breakpoint_file(
1131+
phpdbg_set_breakpoint_file_ex(
11321132
zend_get_executed_filename(),
11331133
strlen(zend_get_executed_filename()),
11341134
zend_get_executed_lineno());
@@ -1141,7 +1141,7 @@ PHPDBG_COMMAND(break) /* {{{ */
11411141
break;
11421142
case NUMERIC_PARAM:
11431143
if (PHPDBG_G(exec)) {
1144-
phpdbg_set_breakpoint_file(phpdbg_current_file(), strlen(phpdbg_current_file()), param->num);
1144+
phpdbg_set_breakpoint_file_ex(phpdbg_current_file(), strlen(phpdbg_current_file()), param->num);
11451145
} else {
11461146
phpdbg_error("inactive", "type=\"noexec\"", "Execution context not set!");
11471147
}
@@ -1156,7 +1156,7 @@ PHPDBG_COMMAND(break) /* {{{ */
11561156
phpdbg_set_breakpoint_function_opline(param->str, param->num);
11571157
break;
11581158
case FILE_PARAM:
1159-
phpdbg_set_breakpoint_file(param->file.name, 0, param->file.line);
1159+
phpdbg_set_breakpoint_file(param->file.name, param->file.line);
11601160
break;
11611161
case NUMERIC_FILE_PARAM:
11621162
phpdbg_set_breakpoint_file_opline(param->file.name, param->file.line);

0 commit comments

Comments
 (0)