From 5ae8f624a1cb3929b567cc47c634297b1a3e7915 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Dec 2013 02:37:12 -0800 Subject: basic fixes to sapi/phpdbg --- sapi/phpdbg/phpdbg_frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sapi/phpdbg/phpdbg_frame.c') diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 24aff59dd9..272b30f263 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -114,7 +114,7 @@ static void phpdbg_dump_prototype(zval **tmp TSRMLS_DC) /* {{{ */ (void **)&class); } else { zend_get_object_classname(*class, (const char **)&Z_STRVAL_PP(class), - (zend_uint *)&Z_STRLEN_PP(class) TSRMLS_CC); + &Z_STRSIZE_PP(class) TSRMLS_CC); } if (is_class == SUCCESS) { @@ -186,14 +186,14 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) { - phpdbg_write("frame #0: {main} at %s:%ld", Z_STRVAL_PP(file), Z_LVAL_PP(line)); + phpdbg_write("frame #0: {main} at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); break; } if (user_defined == SUCCESS) { phpdbg_write("frame #%d: ", i++); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_LVAL_PP(line)); + phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); } else { phpdbg_write(" => "); phpdbg_dump_prototype(tmp TSRMLS_CC); -- cgit v1.2.1 From 0493099786b6135f1fe2f5de763f1edc61428303 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Dec 2013 21:59:44 +0100 Subject: next wave on fixes for ext/phpdbg --- sapi/phpdbg/phpdbg_frame.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sapi/phpdbg/phpdbg_frame.c') diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 272b30f263..d852414822 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -46,13 +46,13 @@ void phpdbg_restore_frame(TSRMLS_D) /* {{{ */ EG(called_scope) = PHPDBG_EX(current_called_scope); } /* }}} */ -void phpdbg_switch_frame(int frame TSRMLS_DC) /* {{{ */ +void phpdbg_switch_frame(php_int_t frame TSRMLS_DC) /* {{{ */ { zend_execute_data *execute_data = PHPDBG_FRAME(num)?PHPDBG_FRAME(execute_data):EG(current_execute_data); - int i = 0; + php_int_t i = 0; if (PHPDBG_FRAME(num) == frame) { - phpdbg_notice("Already in frame #%d", frame); + phpdbg_notice("Already in frame #%pd", frame); return; } @@ -67,7 +67,7 @@ void phpdbg_switch_frame(int frame TSRMLS_DC) /* {{{ */ } if (execute_data == NULL) { - phpdbg_error("No frame #%d", frame); + phpdbg_error("No frame #%pd", frame); return; } @@ -186,14 +186,14 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) { - phpdbg_write("frame #0: {main} at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); + phpdbg_write("frame #0: {main} at %s:%pd", Z_STRVAL_PP(file), Z_IVAL_PP(line)); break; } if (user_defined == SUCCESS) { phpdbg_write("frame #%d: ", i++); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); + phpdbg_writeln(" at %s:%pd", Z_STRVAL_PP(file), Z_IVAL_PP(line)); } else { phpdbg_write(" => "); phpdbg_dump_prototype(tmp TSRMLS_CC); -- cgit v1.2.1 From 047a39c94670517239e9153bfa4680b3aebacaf3 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 26 Apr 2014 00:42:22 +0200 Subject: some more after merge fixes --- sapi/phpdbg/phpdbg_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg_frame.c') diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 8537185465..feab632294 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -186,7 +186,7 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) { - phpdbg_write("frame #%d: {main} at %s:%pd", i, Z_STRVAL_PP(file), Z_LVAL_PP(line)); + phpdbg_write("frame #%d: {main} at %s:%pd", i, Z_STRVAL_PP(file), Z_IVAL_PP(line)); break; } -- cgit v1.2.1 From 63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 08:07:31 +0200 Subject: basic macro replacements, all at once --- sapi/phpdbg/phpdbg_frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sapi/phpdbg/phpdbg_frame.c') diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index a235fe8cb0..67fa6a267f 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -114,7 +114,7 @@ static void phpdbg_dump_prototype(zval **tmp TSRMLS_DC) /* {{{ */ (void **)&class); } else { zend_get_object_classname(*class, (const char **)&Z_STRVAL_PP(class), - (zend_uint *)&Z_STRLEN_PP(class) TSRMLS_CC); + (zend_uint *)&Z_STRSIZE_PP(class) TSRMLS_CC); } if (is_class == SUCCESS) { @@ -186,14 +186,14 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) { - phpdbg_write("frame #%d: {main} at %s:%ld", i, Z_STRVAL_PP(file), Z_LVAL_PP(line)); + phpdbg_write("frame #%d: {main} at %s:%ld", i, Z_STRVAL_PP(file), Z_IVAL_PP(line)); break; } if (user_defined == SUCCESS) { phpdbg_write("frame #%d: ", i++); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_LVAL_PP(line)); + phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); } else { phpdbg_write(" => "); phpdbg_dump_prototype(tmp TSRMLS_CC); -- cgit v1.2.1 From c3e3c98ec666812daaaca896cf5ef758a8a6df14 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:24:55 +0200 Subject: master renames phase 1 --- sapi/phpdbg/phpdbg_frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sapi/phpdbg/phpdbg_frame.c') diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 67fa6a267f..a235fe8cb0 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -114,7 +114,7 @@ static void phpdbg_dump_prototype(zval **tmp TSRMLS_DC) /* {{{ */ (void **)&class); } else { zend_get_object_classname(*class, (const char **)&Z_STRVAL_PP(class), - (zend_uint *)&Z_STRSIZE_PP(class) TSRMLS_CC); + (zend_uint *)&Z_STRLEN_PP(class) TSRMLS_CC); } if (is_class == SUCCESS) { @@ -186,14 +186,14 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) { - phpdbg_write("frame #%d: {main} at %s:%ld", i, Z_STRVAL_PP(file), Z_IVAL_PP(line)); + phpdbg_write("frame #%d: {main} at %s:%ld", i, Z_STRVAL_PP(file), Z_LVAL_PP(line)); break; } if (user_defined == SUCCESS) { phpdbg_write("frame #%d: ", i++); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); + phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_LVAL_PP(line)); } else { phpdbg_write(" => "); phpdbg_dump_prototype(tmp TSRMLS_CC); -- cgit v1.2.1 From 6f9f0bf2056f0dc17d9bcc6dd3b7d28ac878c6fc Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:28:33 +0200 Subject: master renames phase 2 --- sapi/phpdbg/phpdbg_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg_frame.c') diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index a235fe8cb0..5a6a37d5f9 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -114,7 +114,7 @@ static void phpdbg_dump_prototype(zval **tmp TSRMLS_DC) /* {{{ */ (void **)&class); } else { zend_get_object_classname(*class, (const char **)&Z_STRVAL_PP(class), - (zend_uint *)&Z_STRLEN_PP(class) TSRMLS_CC); + (uint32_t *)&Z_STRLEN_PP(class) TSRMLS_CC); } if (is_class == SUCCESS) { -- cgit v1.2.1