mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
fix segfault on set break opline address
This commit is contained in:
parent
68cff82d8b
commit
0781e7b863
3 changed files with 8 additions and 6 deletions
|
@ -143,7 +143,7 @@ void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC) /* {{{ */
|
|||
|
||||
zend_hash_index_update(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], opline, &new_break, sizeof(phpdbg_breakline_t), NULL);
|
||||
|
||||
phpdbg_notice("Breakpoint #%d added at %#lx%s",
|
||||
phpdbg_notice("Breakpoint #%d added at %#lx",
|
||||
new_break.id, new_break.opline);
|
||||
} else {
|
||||
phpdbg_notice("Breakpoint exists at %#lx", opline);
|
||||
|
|
|
@ -90,7 +90,7 @@ PHPDBG_PRINT(class) /* {{{ */
|
|||
|
||||
default: {
|
||||
phpdbg_writeln(
|
||||
"\tInternal Method %s::%s()", (*ce)->name, method->common.function_name);
|
||||
"\tInternal %s::%s()", (*ce)->name, method->common.function_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,11 +74,13 @@ int phpdbg_is_class_method(const char *str, size_t len, char **class, char **met
|
|||
void phpdbg_print(int type TSRMLS_DC, const char *format, ...) /* {{{ */
|
||||
{
|
||||
char *buffer = NULL;
|
||||
va_list args;
|
||||
va_list args = {0};
|
||||
|
||||
va_start(args, format);
|
||||
vspprintf(&buffer, 0, format, args);
|
||||
va_end(args);
|
||||
if (format != NULL && strlen(format) > 0L) {
|
||||
va_start(args, format);
|
||||
vspprintf(&buffer, 0, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/* TODO(anyone) colours */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue