1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 04:32:19 +02:00

Consistency in breakpoint tags, <run> => <stop>

This commit is contained in:
Bob Weinand
2014-10-05 12:33:24 +02:00
parent 9cc73b5c75
commit bedd503c3f
3 changed files with 25 additions and 25 deletions

View File

@@ -252,19 +252,19 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num TSRML
zend_hash_index_update( broken, line_num, (void**)&new_break, sizeof(phpdbg_breakfile_t), NULL);
phpdbg_notice("breakpoint", "success=\"success\" id=\"%d\" file=\"%s\" line=\"%ld\"", "Breakpoint #%d added at %s:%ld",
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" file=\"%s\" line=\"%ld\"", "Breakpoint #%d added at %s:%ld",
new_break.id, new_break.filename, new_break.line);
PHPDBG_BREAK_MAPPING(new_break.id, broken);
} else {
phpdbg_error("breakpoint", "type=\"exists\" file=\"%s\" line=\"%ld\"", "Breakpoint at %s:%ld exists", path, line_num);
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" file=\"%s\" line=\"%ld\"", "Breakpoint at %s:%ld exists", path, line_num);
}
} else {
phpdbg_error("breakpoint", "type=\"notregular\" file=\"%s\"", "Cannot set breakpoint in %s, it is not a regular file", path);
phpdbg_error("breakpoint", "type=\"notregular\" add=\"fail\" file=\"%s\"", "Cannot set breakpoint in %s, it is not a regular file", path);
}
} else {
phpdbg_error("breakpoint", "type=\"nofile\" file=\"%s\"", "Cannot stat %s, it does not exist", path);
phpdbg_error("breakpoint", "type=\"nofile\" add=\"fail\" file=\"%s\"", "Cannot stat %s, it does not exist", path);
}
} /* }}} */
@@ -281,12 +281,12 @@ PHPDBG_API void phpdbg_set_breakpoint_symbol(const char *name, size_t name_len T
zend_hash_update(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], new_break.symbol,
name_len, &new_break, sizeof(phpdbg_breaksymbol_t), NULL);
phpdbg_notice("breakpoint", "success=\"success\" id=\"%d\" function=\"%s\"", "Breakpoint #%d added at %s",
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" function=\"%s\"", "Breakpoint #%d added at %s",
new_break.id, new_break.symbol);
PHPDBG_BREAK_MAPPING(new_break.id, &PHPDBG_G(bp)[PHPDBG_BREAK_SYM]);
} else {
phpdbg_error("breakpoint", "type=\"exists\" function=\"%s\"", "Breakpoint exists at %s", name);
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" function=\"%s\"", "Breakpoint exists at %s", name);
}
} /* }}} */
@@ -320,12 +320,12 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char
zend_hash_update(class_table, lcname, func_len,
&new_break, sizeof(phpdbg_breakmethod_t), NULL);
phpdbg_notice("breakpoint", "success=\"success\" id=\"%d\" method=\"%s::%s\"", "Breakpoint #%d added at %s::%s",
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" method=\"%s::%s\"", "Breakpoint #%d added at %s::%s",
new_break.id, class_name, func_name);
PHPDBG_BREAK_MAPPING(new_break.id, class_table);
} else {
phpdbg_error("breakpoint", "type=\"exists\" method=\"%s::%s\"", "Breakpoint exists at %s::%s", class_name, func_name);
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" method=\"%s::%s\"", "Breakpoint exists at %s::%s", class_name, func_name);
}
efree(lcname);
@@ -346,11 +346,11 @@ PHPDBG_API 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", "success=\"success\" id=\"%d\" opline=\"%#lx\"", "Breakpoint #%d added at %#lx",
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" opline=\"%#lx\"", "Breakpoint #%d added at %#lx",
new_break.id, new_break.opline);
PHPDBG_BREAK_MAPPING(new_break.id, &PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE]);
} else {
phpdbg_error("breakpoint", "type=\"exists\" opline=\"%#lx\"", "Breakpoint exists at %#lx", opline);
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" opline=\"%#lx\"", "Breakpoint exists at %#lx", opline);
}
} /* }}} */
@@ -359,11 +359,11 @@ PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_o
phpdbg_breakline_t opline_break;
if (op_array->last <= brake->opline_num) {
if (brake->class_name == NULL) {
phpdbg_error("breakpoint", "type=\"maxoplines\" maxoplinenum=\"%d\" function=\"%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in function %s (breaking at opline %ld impossible)", op_array->last, brake->func_name, brake->opline_num);
phpdbg_error("breakpoint", "type=\"maxoplines\" add=\"fail\" maxoplinenum=\"%d\" function=\"%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in function %s (breaking at opline %ld impossible)", op_array->last, brake->func_name, brake->opline_num);
} else if (brake->func_name == NULL) {
phpdbg_error("breakpoint", "type=\"maxoplines\" maxoplinenum=\"%d\" file=\"%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in file %s (breaking at opline %ld impossible)", op_array->last, brake->class_name, brake->opline_num);
phpdbg_error("breakpoint", "type=\"maxoplines\" add=\"fail\" maxoplinenum=\"%d\" file=\"%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in file %s (breaking at opline %ld impossible)", op_array->last, brake->class_name, brake->opline_num);
} else {
phpdbg_error("breakpoint", "type=\"maxoplines\" maxoplinenum=\"%d\" method=\"%s::%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in method %s::%s (breaking at opline %ld impossible)", op_array->last, brake->class_name, brake->func_name, brake->opline_num);
phpdbg_error("breakpoint", "type=\"maxoplines\" add=\"fail\" maxoplinenum=\"%d\" method=\"%s::%s\" usedoplinenum=\"%ld\"", "There are only %d oplines in method %s::%s (breaking at opline %ld impossible)", op_array->last, brake->class_name, brake->func_name, brake->opline_num);
}
return FAILURE;
@@ -419,7 +419,7 @@ PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array TSRMLS_DC
zend_hash_internal_pointer_end(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE]);
zend_hash_get_current_data(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (void **)&opline_break);
phpdbg_notice("breakpoint", "success=\"success\" id=\"%d\" symbol=\"%s\" num=\"%ld\" opline=\"%#lx\"", "Breakpoint #%d resolved at %s%s%s#%ld (opline %#lx)",
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" symbol=\"%s\" num=\"%ld\" opline=\"%#lx\"", "Breakpoint #%d resolved at %s%s%s#%ld (opline %#lx)",
brake->id,
brake->class_name?brake->class_name:"",
brake->class_name&&brake->func_name?"::":"",
@@ -1131,10 +1131,10 @@ PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num TSRMLS_DC) /* {{{ */
break;
}
phpdbg_notice("breakpoint", "deleted=\"deleted\" id=\"%ld\"", "Deleted breakpoint #%ld", num);
phpdbg_notice("breakpoint", "deleted=\"success\" id=\"%ld\"", "Deleted breakpoint #%ld", num);
PHPDBG_BREAK_UNMAPPING(num);
} else {
phpdbg_error("breakpoint", "type=\"nobreakpoint\" id=\"%ld\"", "Failed to find breakpoint #%ld", num);
phpdbg_error("breakpoint", "type=\"nobreakpoint\" deleted=\"fail\" id=\"%ld\"", "Failed to find breakpoint #%ld", num);
}
} /* }}} */

View File

@@ -609,14 +609,14 @@ PHPDBG_COMMAND(run) /* {{{ */
PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE;
zend_execute(EG(active_op_array) TSRMLS_CC);
PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE;
phpdbg_notice("run", "type=\"end\"", "Script ended normally");
phpdbg_notice("stop", "type=\"normal\"", "Script ended normally");
} zend_catch {
EG(active_op_array) = orig_op_array;
EG(opline_ptr) = orig_opline;
EG(return_value_ptr_ptr) = orig_retval_ptr;
if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
phpdbg_error("run", "type=\"bailout\"", "Caught exit/error from VM");
phpdbg_error("stop", "type=\"bailout\"", "Caught exit/error from VM");
restore = 0;
}
} zend_end_try();

14
xml.md
View File

@@ -116,7 +116,7 @@ command
- invalidcommand: command input is totally invalid
- (nostack: should not happen: is an internal error)
- (emptystack: should not happen: is an internal error)
p- command: passed command
- command: passed command
- subcommand: passed subcommand (present if the error is related to the subcommand)
- expected: count of expected arguments
- got: type of argument for type "wrongarg"
@@ -160,9 +160,9 @@ break / info break
- id: the breakpoint id (if the leave command was executed, the id has the value "leave")
- num: the nth opline of a function/method/file
- success: has value "success": a brekpoint was successfully added
- add: has value "success"/"fail": a brekpoint was successfully/not added
- pending: the breakpoint is waiting for resolving (e.g. a file opline on a not yet loaded file)
- deleted: has value "deleted": a breakpoint was successfully deleted
- deleted: has value "success"/"fail": a breakpoint was successfully/not deleted
- eval: the condition on conditional breakpoints
- file
- opline
@@ -382,12 +382,12 @@ exec
- invalid: given context (attribute) is not matching a valid file or symlink
- notfound: given context (attribute) does not exist
run
---
run / <stop> tag
----------------
- runs the script (set via exec command)
- &lt;run type="end" />: script execution ended normally
- (error) &lt;run type="bailout" /> the VM bailed out (usually because there was some error)
- &lt;stop type="end" />: script execution ended normally
- (error) &lt;stop type="bailout" /> the VM bailed out (usually because there was some error)
- compile failures see under exec, errors, &lt;compile>
step