mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- CS + ws
This commit is contained in:
parent
793f1d7c4a
commit
c987e46b6f
1 changed files with 8 additions and 7 deletions
|
@ -132,7 +132,8 @@ static inline int phpdbg_call_register(phpdbg_input_t *input TSRMLS_DC) /* {{{ *
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init TSRMLS_DC) {
|
void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init TSRMLS_DC) /* {{{ */
|
||||||
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
if (init_file && VCWD_STAT(init_file, &sb) != -1) {
|
if (init_file && VCWD_STAT(init_file, &sb) != -1) {
|
||||||
|
@ -190,7 +191,7 @@ void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_
|
||||||
{
|
{
|
||||||
phpdbg_input_t *input = phpdbg_read_input(cmd TSRMLS_CC);
|
phpdbg_input_t *input = phpdbg_read_input(cmd TSRMLS_CC);
|
||||||
switch (phpdbg_do_cmd(phpdbg_prompt_commands, input TSRMLS_CC)) {
|
switch (phpdbg_do_cmd(phpdbg_prompt_commands, input TSRMLS_CC)) {
|
||||||
case FAILURE:
|
case FAILURE:
|
||||||
if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
|
if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
|
||||||
if (phpdbg_call_register(input TSRMLS_CC) == FAILURE) {
|
if (phpdbg_call_register(input TSRMLS_CC) == FAILURE) {
|
||||||
phpdbg_error("Unrecognized command in %s:%d: %s!", init_file, line, input->string);
|
phpdbg_error("Unrecognized command in %s:%d: %s!", init_file, line, input->string);
|
||||||
|
@ -244,7 +245,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default TS
|
||||||
if (i != -1) {
|
if (i != -1) {
|
||||||
scan_dir[i] = 0;
|
scan_dir[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
asprintf(
|
asprintf(
|
||||||
&init_file, "%s/%s", scan_dir, PHPDBG_INIT_FILENAME);
|
&init_file, "%s/%s", scan_dir, PHPDBG_INIT_FILENAME);
|
||||||
phpdbg_try_file_init(init_file, strlen(init_file), 1 TSRMLS_CC);
|
phpdbg_try_file_init(init_file, strlen(init_file), 1 TSRMLS_CC);
|
||||||
|
@ -838,7 +839,7 @@ PHPDBG_COMMAND(print) /* {{{ */
|
||||||
phpdbg_writeln("Functions\t%d", zend_hash_num_elements(EG(function_table)));
|
phpdbg_writeln("Functions\t%d", zend_hash_num_elements(EG(function_table)));
|
||||||
phpdbg_writeln("Constants\t%d", zend_hash_num_elements(EG(zend_constants)));
|
phpdbg_writeln("Constants\t%d", zend_hash_num_elements(EG(zend_constants)));
|
||||||
phpdbg_writeln("Included\t%d", zend_hash_num_elements(&EG(included_files)));
|
phpdbg_writeln("Included\t%d", zend_hash_num_elements(&EG(included_files)));
|
||||||
|
|
||||||
phpdbg_writeln(SEPARATE);
|
phpdbg_writeln(SEPARATE);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
@ -923,7 +924,7 @@ PHPDBG_COMMAND(source) /* {{{ */
|
||||||
switch (param->type) {
|
switch (param->type) {
|
||||||
case STR_PARAM: {
|
case STR_PARAM: {
|
||||||
if (input->argc > 2) {
|
if (input->argc > 2) {
|
||||||
if (phpdbg_argv_is(1, "export")) {
|
if (phpdbg_argv_is(1, "export")) {
|
||||||
FILE *h = VCWD_FOPEN(input->argv[2]->string, "w+");
|
FILE *h = VCWD_FOPEN(input->argv[2]->string, "w+");
|
||||||
if (h) {
|
if (h) {
|
||||||
phpdbg_export_breakpoints(h TSRMLS_CC);
|
phpdbg_export_breakpoints(h TSRMLS_CC);
|
||||||
|
@ -1400,8 +1401,8 @@ zend_vm_enter:
|
||||||
/* search for breakpoints */
|
/* search for breakpoints */
|
||||||
{
|
{
|
||||||
phpdbg_breakbase_t *brake;
|
phpdbg_breakbase_t *brake;
|
||||||
|
|
||||||
if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) &&
|
if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) &&
|
||||||
(brake = phpdbg_find_breakpoint(execute_data TSRMLS_CC))) {
|
(brake = phpdbg_find_breakpoint(execute_data TSRMLS_CC))) {
|
||||||
phpdbg_hit_breakpoint(
|
phpdbg_hit_breakpoint(
|
||||||
brake, 1 TSRMLS_CC);
|
brake, 1 TSRMLS_CC);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue