diff options
Diffstat (limited to 'sapi')
43 files changed, 1593 insertions, 1569 deletions
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h index 72238f2e87..7dd1993544 100644 --- a/sapi/apache2handler/php_apache.h +++ b/sapi/apache2handler/php_apache.h @@ -46,11 +46,7 @@ typedef struct php_struct { request_rec *r; apr_bucket_brigade *brigade; /* stat structure of the current file */ -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc finfo; -#else zend_stat_t finfo; -#endif /* Whether or not we've processed PHP in the output filters yet. */ int request_processed; /* final content type */ diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index f05f5128bb..b3a4f22998 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -42,7 +42,7 @@ #include "util_script.h" #include "http_core.h" #include "ap_mpm.h" -#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE) +#if !defined(WIN32) && !defined(WINNT) #include "unixd.h" #endif @@ -371,7 +371,7 @@ PHP_MINFO_FUNCTION(apache) int n, max_requests; char *p; server_rec *serv = ((php_struct *) SG(server_context))->r->server; -#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE) +#if !defined(WIN32) && !defined(WINNT) #if MODULE_MAGIC_NUMBER_MAJOR >= 20081201 AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config; #else @@ -410,7 +410,7 @@ PHP_MINFO_FUNCTION(apache) snprintf(tmp, sizeof(tmp), "%s:%u", serv->server_hostname, serv->port); php_info_print_table_row(2, "Hostname:Port", tmp); -#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE) +#if !defined(WIN32) && !defined(WINNT) #if MODULE_MAGIC_NUMBER_MAJOR >= 20081201 snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id); #else diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 5ec248a02d..0ee4fcbddf 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -31,11 +31,7 @@ #include <fcntl.h> #include "zend_smart_str.h" -#ifndef NETWARE #include "ext/standard/php_standard.h" -#else -#include "ext/standard/basic_functions.h" -#endif #include "apr_strings.h" #include "ap_config.h" @@ -53,9 +49,9 @@ #include "php_apache.h" -/* UnixWare and Netware define shutdown to _shutdown, which causes problems later +/* UnixWare define shutdown to _shutdown, which causes problems later * on when using a structure member named shutdown. Since this source - * file does not use the system call shutdown, it is safe to #undef it.K + * file does not use the system call shutdown, it is safe to #undef it. */ #undef shutdown @@ -223,16 +219,9 @@ php_apache_sapi_get_stat(void) #endif ctx->finfo.st_dev = ctx->r->finfo.device; ctx->finfo.st_ino = ctx->r->finfo.inode; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - ctx->finfo.st_atime.tv_sec = apr_time_sec(ctx->r->finfo.atime); - ctx->finfo.st_mtime.tv_sec = apr_time_sec(ctx->r->finfo.mtime); - ctx->finfo.st_ctime.tv_sec = apr_time_sec(ctx->r->finfo.ctime); -#else ctx->finfo.st_atime = apr_time_sec(ctx->r->finfo.atime); ctx->finfo.st_mtime = apr_time_sec(ctx->r->finfo.mtime); ctx->finfo.st_ctime = apr_time_sec(ctx->r->finfo.ctime); -#endif - ctx->finfo.st_size = ctx->r->finfo.size; ctx->finfo.st_nlink = ctx->r->finfo.nlink; diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index ef75d980dd..8639027dbc 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -96,6 +96,10 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; # include "openssl/applink.c" #endif +#ifdef HAVE_VALGRIND +# include "valgrind/callgrind.h" +#endif + #ifndef PHP_WIN32 /* XXX this will need to change later when threaded fastcgi is implemented. shane */ struct sigaction act, old_term, old_quit, old_int; @@ -1774,16 +1778,6 @@ int main(int argc, char *argv[]) char *decoded_query_string; int skip_getopt = 0; -#if 0 && defined(PHP_DEBUG) - /* IIS is always making things more difficult. This allows - * us to stop PHP and attach a debugger before much gets started */ - { - char szMessage [256]; - wsprintf (szMessage, "Please attach a debugger to the process 0x%X [%d] (%s) and click OK", GetCurrentProcessId(), GetCurrentProcessId(), argv[0]); - MessageBox(NULL, szMessage, "CGI Debug Time!", MB_OK|MB_SERVICE_NOTIFICATION); - } -#endif - #ifdef HAVE_SIGNAL_H #if defined(SIGPIPE) && defined(SIG_IGN) signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so @@ -2256,6 +2250,11 @@ consult the installation file that came with this distribution, or visit \n\ if (comma) { warmup_repeats = atoi(php_optarg); repeats = atoi(comma + 1); +#ifdef HAVE_VALGRIND + if (warmup_repeats > 0) { + CALLGRIND_STOP_INSTRUMENTATION; + } +#endif } else { repeats = atoi(php_optarg); } @@ -2467,7 +2466,7 @@ consult the installation file that came with this distribution, or visit \n\ file_handle.filename = SG(request_info).path_translated; file_handle.handle.fp = NULL; } else { - file_handle.filename = "-"; + file_handle.filename = "Standard input code"; file_handle.type = ZEND_HANDLE_FP; file_handle.handle.fp = stdin; } @@ -2678,6 +2677,9 @@ fastcgi_request_done: #else time(&start); #endif +#ifdef HAVE_VALGRIND + CALLGRIND_START_INSTRUMENTATION; +#endif } continue; } else { diff --git a/sapi/cgi/tests/002.phpt b/sapi/cgi/tests/002.phpt index 884e6521e2..fda8fcbe04 100644 --- a/sapi/cgi/tests/002.phpt +++ b/sapi/cgi/tests/002.phpt @@ -31,22 +31,22 @@ echo "Done\n"; string(%d) "X-Powered-By: PHP/%s Content-type: text/html%r; charset=.*|%r -%unicode|string%(3) "111" +string(3) "111" " string(%d) "X-Powered-By: PHP/%s Content-type: text/html%r; charset=.*|%r -%unicode|string%(3) "500" +string(3) "500" " string(%d) "X-Powered-By: PHP/%s Content-type: text/html%r; charset=.*|%r -%unicode|string%(3) "555" +string(3) "555" " string(%d) "X-Powered-By: PHP/%s Content-type: text/html%r; charset=.*|%r -%unicode|string%(3) "555" -%unicode|string%(10) "/test/path" +string(3) "555" +string(10) "/test/path" " Done diff --git a/sapi/cgi/tests/007.phpt b/sapi/cgi/tests/007.phpt index f2c9c0226c..841137a046 100644 --- a/sapi/cgi/tests/007.phpt +++ b/sapi/cgi/tests/007.phpt @@ -17,6 +17,6 @@ var_dump(`"$php" -n -s -w -l`); --EXPECTF-- string(25) "No input file specified. " -string(31) "No syntax errors detected in - +string(49) "No syntax errors detected in Standard input code " ===DONE=== diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 index 04db2fecee..21681512a7 100644 --- a/sapi/cli/config.m4 +++ b/sapi/cli/config.m4 @@ -44,9 +44,6 @@ if test "$PHP_CLI" != "no"; then *darwin*) BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" ;; - *netware*) - BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp7lib -o \$(SAPI_CLI_PATH)" - ;; *) BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" ;; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 7096829c63..d1fa6a6d00 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -38,6 +38,7 @@ #ifdef PHP_WIN32 #include "win32/time.h" #include "win32/signal.h" +#include "win32/console.h" #include <process.h> #include <shellapi.h> #endif @@ -243,8 +244,11 @@ static void print_extensions(void) /* {{{ */ #ifndef STDOUT_FILENO #define STDOUT_FILENO 1 #endif +#ifndef STDERR_FILENO +#define STDERR_FILENO 2 +#endif -static inline int sapi_cli_select(int fd) +static inline int sapi_cli_select(php_socket_t fd) { fd_set wfd, dfd; struct timeval tv; @@ -670,7 +674,11 @@ static int do_cli(int argc, char **argv) /* {{{ */ char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL; char *arg_free=NULL, **arg_excp=&arg_free; char *script_file=NULL, *translated_path = NULL; +#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE) && (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE) + int interactive = php_win32_console_is_own(); +#else int interactive=0; +#endif int lineno = 0; const char *param_error=NULL; int hide_argv = 0; @@ -944,7 +952,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ /* here but this would make things only more complicated. And it */ /* is consitent with the way -R works where the stdin file handle*/ /* is also accessible. */ - file_handle.filename = "-"; + file_handle.filename = "Standard input code"; file_handle.handle.fp = stdin; } file_handle.type = ZEND_HANDLE_FP; @@ -983,7 +991,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ PG(during_request_startup) = 0; switch (behavior) { case PHP_MODE_STANDARD: - if (strcmp(file_handle.filename, "-")) { + if (strcmp(file_handle.filename, "Standard input code")) { cli_register_file_handles(); } @@ -1125,7 +1133,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ } case PHP_MODE_REFLECTION_EXT_INFO: { - int len = (int)strlen(reflection_what); + size_t len = strlen(reflection_what); char *lcname = zend_str_tolower_dup(reflection_what, len); zend_module_entry *module; @@ -1201,7 +1209,7 @@ int main(int argc, char *argv[]) int php_optind = 1, use_extended_info = 0; char *ini_path_override = NULL; char *ini_entries = NULL; - int ini_entries_len = 0; + size_t ini_entries_len = 0; int ini_ignore = 0; sapi_module_struct *sapi_module = &cli_sapi_module; @@ -1211,6 +1219,11 @@ int main(int argc, char *argv[]) */ argv = save_ps_args(argc, argv); +#if defined(PHP_WIN32) && !defined(PHP_CLI_WIN32_NO_CONSOLE) + php_win32_console_fileno_set_vt100(STDOUT_FILENO, TRUE); + php_win32_console_fileno_set_vt100(STDERR_FILENO, TRUE); +#endif + cli_sapi_module.additional_functions = additional_functions; #if defined(PHP_WIN32) && defined(_DEBUG) && defined(PHP_WIN32_DEBUG_HEAP) @@ -1270,7 +1283,7 @@ int main(int argc, char *argv[]) break; case 'd': { /* define ini entries on command line */ - int len = (int)strlen(php_optarg); + size_t len = strlen(php_optarg); char *val; if ((val = strchr(php_optarg, '='))) { @@ -1278,11 +1291,11 @@ int main(int argc, char *argv[]) if (!isalnum(*val) && *val != '"' && *val != '\'' && *val != '\0') { ini_entries = realloc(ini_entries, ini_entries_len + len + sizeof("\"\"\n\0")); memcpy(ini_entries + ini_entries_len, php_optarg, (val - php_optarg)); - ini_entries_len += (int)(val - php_optarg); + ini_entries_len += (val - php_optarg); memcpy(ini_entries + ini_entries_len, "\"", 1); ini_entries_len++; memcpy(ini_entries + ini_entries_len, val, len - (val - php_optarg)); - ini_entries_len += len - (int)(val - php_optarg); + ini_entries_len += len - (val - php_optarg); memcpy(ini_entries + ini_entries_len, "\"\n\0", sizeof("\"\n\0")); ini_entries_len += sizeof("\n\0\"") - 2; } else { diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index e7650cb763..1f4eb38604 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -211,6 +211,8 @@ static php_cli_server_http_response_status_code_pair template_map[] = { static int php_cli_output_is_tty = OUTPUT_NOT_CHECKED; #endif +static const char php_cli_server_request_error_unexpected_eof[] = "Unexpected EOF"; + static size_t php_cli_server_client_send_through(php_cli_server_client *client, const char *str, size_t str_len); static php_cli_server_chunk *php_cli_server_chunk_heap_new_self_contained(size_t len); static void php_cli_server_buffer_append(php_cli_server_buffer *buffer, php_cli_server_chunk *chunk); @@ -410,7 +412,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value) /* {{ do { p++; } while (*p == ' ' || *p == '\t'); - add_assoc_stringl_ex(return_value, s, (uint)len, p, h->header_len - (p - h->header)); + add_assoc_stringl_ex(return_value, s, (uint32_t)len, p, h->header_len - (p - h->header)); free_alloca(s, use_heap); } } @@ -604,7 +606,7 @@ static int sapi_cli_server_register_entry_cb(char **entry, int num_args, va_list zval *track_vars_array = va_arg(args, zval *); if (hash_key->key) { char *real_key, *key; - uint i; + uint32_t i; key = estrndup(ZSTR_VAL(hash_key->key), ZSTR_LEN(hash_key->key)); for(i=0; i<ZSTR_LEN(hash_key->key); i++) { if (key[i] == '-') { @@ -928,9 +930,6 @@ static size_t php_cli_server_buffer_size(const php_cli_server_buffer *buffer) /* static php_cli_server_chunk *php_cli_server_chunk_immortal_new(const char *buf, size_t len) /* {{{ */ { php_cli_server_chunk *chunk = pemalloc(sizeof(php_cli_server_chunk), 1); - if (!chunk) { - return NULL; - } chunk->type = PHP_CLI_SERVER_CHUNK_IMMORTAL; chunk->next = NULL; @@ -942,9 +941,6 @@ static php_cli_server_chunk *php_cli_server_chunk_immortal_new(const char *buf, static php_cli_server_chunk *php_cli_server_chunk_heap_new(void *block, char *buf, size_t len) /* {{{ */ { php_cli_server_chunk *chunk = pemalloc(sizeof(php_cli_server_chunk), 1); - if (!chunk) { - return NULL; - } chunk->type = PHP_CLI_SERVER_CHUNK_HEAP; chunk->next = NULL; @@ -957,9 +953,6 @@ static php_cli_server_chunk *php_cli_server_chunk_heap_new(void *block, char *bu static php_cli_server_chunk *php_cli_server_chunk_heap_new_self_contained(size_t len) /* {{{ */ { php_cli_server_chunk *chunk = pemalloc(sizeof(php_cli_server_chunk) + len, 1); - if (!chunk) { - return NULL; - } chunk->type = PHP_CLI_SERVER_CHUNK_HEAP; chunk->next = NULL; @@ -1215,12 +1208,6 @@ static php_socket_t php_network_listen_socket(const char *host, int *port, int s #if HAVE_GETADDRINFO && HAVE_IPV6 case AF_INET6: sa = pemalloc(sizeof(struct sockaddr_in6), 1); - if (!sa) { - closesocket(retval); - retval = SOCK_ERR; - *errstr = NULL; - goto out; - } *(struct sockaddr_in6 *)sa = *(struct sockaddr_in6 *)*p; ((struct sockaddr_in6 *)sa)->sin6_port = htons(*port); *socklen = sizeof(struct sockaddr_in6); @@ -1228,12 +1215,6 @@ static php_socket_t php_network_listen_socket(const char *host, int *port, int s #endif case AF_INET: sa = pemalloc(sizeof(struct sockaddr_in), 1); - if (!sa) { - closesocket(retval); - retval = SOCK_ERR; - *errstr = NULL; - goto out; - } *(struct sockaddr_in *)sa = *(struct sockaddr_in *)*p; ((struct sockaddr_in *)sa)->sin_port = htons(*port); *socklen = sizeof(struct sockaddr_in); @@ -1370,10 +1351,6 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque size_t prev_path_len = 0; int is_static_file = 0; - if (!buf) { - return; - } - memmove(p, document_root, document_root_len); p += document_root_len; vpath = p; @@ -1458,7 +1435,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque } #ifdef PHP_WIN32 { - uint i = 0; + uint32_t i = 0; for (;i<request->vpath_len;i++) { if (request->vpath[i] == '\\') { request->vpath[i] = '/'; @@ -1487,7 +1464,7 @@ static void normalize_vpath(char **retval, size_t *retval_len, const char *vpath #ifdef PHP_WIN32 { char *p = decoded_vpath; - + do { if (*p == '\\') { *p = '/'; @@ -1642,9 +1619,6 @@ static int php_cli_server_client_read_request_on_body(php_http_parser *parser, c php_cli_server_client *client = parser->data; if (!client->request.content) { client->request.content = pemalloc(parser->content_length, 1); - if (!client->request.content) { - return -1; - } client->request.content_len = 0; } client->request.content = perealloc(client->request.content, client->request.content_len + length, 1); @@ -1705,7 +1679,7 @@ static int php_cli_server_client_read_request(php_cli_server_client *client, cha *errstr = php_socket_strerror(err, NULL, 0); return -1; } else if (nbytes_read == 0) { - *errstr = estrdup("Unexpected EOF"); + *errstr = estrdup(php_cli_server_request_error_unexpected_eof); return -1; } client->parser.data = client; @@ -1720,9 +1694,6 @@ static int php_cli_server_client_read_request(php_cli_server_client *client, cha } if (client->current_header_name) { char *header_name = safe_pemalloc(client->current_header_name_len, 1, 1, 1); - if (!header_name) { - return -1; - } memmove(header_name, client->current_header_name, client->current_header_name_len); client->current_header_name = header_name; client->current_header_name_allocated = 1; @@ -1837,7 +1808,7 @@ static void php_cli_server_client_dtor(php_cli_server_client *client) /* {{{ */ static void php_cli_server_close_connection(php_cli_server *server, php_cli_server_client *client) /* {{{ */ { -#ifdef DEBUG +#if PHP_DEBUG php_cli_server_logf("%s Closing", client->addr_str); #endif zend_hash_index_del(&server->clients, client->sock); @@ -2328,7 +2299,13 @@ static int php_cli_server_recv_event_read_request(php_cli_server *server, php_cl char *errstr = NULL; int status = php_cli_server_client_read_request(client, &errstr); if (status < 0) { - php_cli_server_logf("%s Invalid request (%s)", client->addr_str, errstr); + if (strcmp(errstr, php_cli_server_request_error_unexpected_eof) == 0 && client->parser.state == s_start_req) { +#if PHP_DEBUG + php_cli_server_logf("%s Closed without sending a request; it was probably just an unused speculative preconnection", client->addr_str); +#endif + } else { + php_cli_server_logf("%s Invalid request (%s)", client->addr_str, errstr); + } efree(errstr); php_cli_server_close_connection(server, client); return FAILURE; @@ -2389,9 +2366,6 @@ static int php_cli_server_do_event_for_each_fd_callback(void *_params, php_socke php_socket_t client_sock; socklen_t socklen = server->socklen; struct sockaddr *sa = pemalloc(server->socklen, 1); - if (!sa) { - return FAILURE; - } client_sock = accept(server->server_sock, sa, &socklen); if (!ZEND_VALID_SOCKET(client_sock)) { char *errstr; @@ -2406,13 +2380,14 @@ static int php_cli_server_do_event_for_each_fd_callback(void *_params, php_socke closesocket(client_sock); return SUCCESS; } - if (!(client = pemalloc(sizeof(php_cli_server_client), 1)) || FAILURE == php_cli_server_client_ctor(client, server, client_sock, sa, socklen)) { + client = pemalloc(sizeof(php_cli_server_client), 1); + if (FAILURE == php_cli_server_client_ctor(client, server, client_sock, sa, socklen)) { php_cli_server_logf("Failed to create a new request object"); pefree(sa, 1); closesocket(client_sock); return SUCCESS; } -#ifdef DEBUG +#if PHP_DEBUG php_cli_server_logf("%s Accepted", client->addr_str); #endif zend_hash_index_update_ptr(&server->clients, client_sock, client); diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c index 59361d0911..63769c15ac 100644 --- a/sapi/cli/php_http_parser.c +++ b/sapi/cli/php_http_parser.c @@ -195,75 +195,6 @@ static const uint8_t normal_url_char[256] = { 1, 1, 1, 1, 1, 1, 1, 0 }; -enum state - { s_dead = 1 /* important that this is > 0 */ - - , s_start_req_or_res - , s_res_or_resp_H - , s_start_res - , s_res_H - , s_res_HT - , s_res_HTT - , s_res_HTTP - , s_res_first_http_major - , s_res_http_major - , s_res_first_http_minor - , s_res_http_minor - , s_res_first_status_code - , s_res_status_code - , s_res_status - , s_res_line_almost_done - - , s_start_req - - , s_req_method - , s_req_spaces_before_url - , s_req_schema - , s_req_schema_slash - , s_req_schema_slash_slash - , s_req_host - , s_req_port - , s_req_path - , s_req_query_string_start - , s_req_query_string - , s_req_fragment_start - , s_req_fragment - , s_req_http_start - , s_req_http_H - , s_req_http_HT - , s_req_http_HTT - , s_req_http_HTTP - , s_req_first_http_major - , s_req_http_major - , s_req_first_http_minor - , s_req_http_minor - , s_req_line_almost_done - - , s_header_field_start - , s_header_field - , s_header_value_start - , s_header_value - - , s_header_almost_done - - , s_headers_almost_done - /* Important: 's_headers_almost_done' must be the last 'header' state. All - * states beyond this must be 'body' states. It is used for overflow - * checking. See the PARSING_HEADER() macro. - */ - , s_chunk_size_start - , s_chunk_size - , s_chunk_size_almost_done - , s_chunk_parameters - , s_chunk_data - , s_chunk_data_almost_done - , s_chunk_data_done - - , s_body_identity - , s_body_identity_eof - }; - - #define PARSING_HEADER(state) (state <= s_headers_almost_done && 0 == (parser->flags & F_TRAILING)) diff --git a/sapi/cli/php_http_parser.h b/sapi/cli/php_http_parser.h index fa4873abeb..d2fa69b757 100644 --- a/sapi/cli/php_http_parser.h +++ b/sapi/cli/php_http_parser.h @@ -110,6 +110,73 @@ enum php_http_method enum php_http_parser_type { PHP_HTTP_REQUEST, PHP_HTTP_RESPONSE, PHP_HTTP_BOTH }; +enum state + { s_dead = 1 /* important that this is > 0 */ + + , s_start_req_or_res + , s_res_or_resp_H + , s_start_res + , s_res_H + , s_res_HT + , s_res_HTT + , s_res_HTTP + , s_res_first_http_major + , s_res_http_major + , s_res_first_http_minor + , s_res_http_minor + , s_res_first_status_code + , s_res_status_code + , s_res_status + , s_res_line_almost_done + + , s_start_req + + , s_req_method + , s_req_spaces_before_url + , s_req_schema + , s_req_schema_slash + , s_req_schema_slash_slash + , s_req_host + , s_req_port + , s_req_path + , s_req_query_string_start + , s_req_query_string + , s_req_fragment_start + , s_req_fragment + , s_req_http_start + , s_req_http_H + , s_req_http_HT + , s_req_http_HTT + , s_req_http_HTTP + , s_req_first_http_major + , s_req_http_major + , s_req_first_http_minor + , s_req_http_minor + , s_req_line_almost_done + + , s_header_field_start + , s_header_field + , s_header_value_start + , s_header_value + + , s_header_almost_done + + , s_headers_almost_done + /* Important: 's_headers_almost_done' must be the last 'header' state. All + * states beyond this must be 'body' states. It is used for overflow + * checking. See the PARSING_HEADER() macro. + */ + , s_chunk_size_start + , s_chunk_size + , s_chunk_size_almost_done + , s_chunk_parameters + , s_chunk_data + , s_chunk_data_almost_done + , s_chunk_data_done + + , s_body_identity + , s_body_identity_eof + }; struct php_http_parser { /** PRIVATE **/ diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index b24da56660..849a8b14e5 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -39,10 +39,11 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] { } } - - Constants [15] { + - Constants [16] { Constant [ integer PREG_PATTERN_ORDER ] { 1 } Constant [ integer PREG_SET_ORDER ] { 2 } Constant [ integer PREG_OFFSET_CAPTURE ] { 256 } + Constant [ integer PREG_UNMATCHED_AS_NULL ] { 512 } Constant [ integer PREG_SPLIT_NO_EMPTY ] { 1 } Constant [ integer PREG_SPLIT_DELIM_CAPTURE ] { 2 } Constant [ integer PREG_SPLIT_OFFSET_CAPTURE ] { 4 } diff --git a/sapi/cli/tests/015.phpt b/sapi/cli/tests/015.phpt index ab5918b4d2..62a007b6e4 100644 --- a/sapi/cli/tests/015.phpt +++ b/sapi/cli/tests/015.phpt @@ -24,7 +24,7 @@ echo "Done\n"; PHP %d.%d.%d%s(cli) (built: %s)%s Array ( - [0] => - + [0] => Standard input code [1] => foo [2] => bar [3] => baz diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt index 7c50a5e30a..f308ffb226 100644 --- a/sapi/cli/tests/php_cli_server_014.phpt +++ b/sapi/cli/tests/php_cli_server_014.phpt @@ -7,7 +7,7 @@ include "skipif.inc"; --FILE-- <?php include "php_cli_server.inc"; -php_cli_server_start('echo done, "\n";', null); +php_cli_server_start('echo "done\n";', null); list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); $port = intval($port)?:80; diff --git a/sapi/fpm/.gitignore b/sapi/fpm/.gitignore new file mode 100644 index 0000000000..3f8c0913a4 --- /dev/null +++ b/sapi/fpm/.gitignore @@ -0,0 +1,4 @@ +php-fpm.8 +php-fpm.service +status.html +www.conf diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index b497d2c82c..8ab120a4b6 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -146,6 +146,7 @@ static struct ini_value_parser_s ini_fpm_pool_options[] = { { "access.format", &fpm_conf_set_string, WPO(access_format) }, { "slowlog", &fpm_conf_set_string, WPO(slowlog) }, { "request_slowlog_timeout", &fpm_conf_set_time, WPO(request_slowlog_timeout) }, + { "request_slowlog_trace_depth", &fpm_conf_set_integer, WPO(request_slowlog_trace_depth) }, { "request_terminate_timeout", &fpm_conf_set_time, WPO(request_terminate_timeout) }, { "rlimit_files", &fpm_conf_set_integer, WPO(rlimit_files) }, { "rlimit_core", &fpm_conf_set_rlimit_core, WPO(rlimit_core) }, @@ -970,6 +971,30 @@ static int fpm_conf_process_all_pools() /* {{{ */ } } + /* request_slowlog_trace_depth */ + if (wp->config->request_slowlog_trace_depth) { +#if HAVE_FPM_TRACE + if (! (wp->config->slowlog && *wp->config->slowlog)) { + zlog(ZLOG_ERROR, "[pool %s] 'slowlog' must be specified for use with 'request_slowlog_trace_depth'", wp->config->name); + return -1; + } +#else + static int warned = 0; + + if (!warned) { + zlog(ZLOG_WARNING, "[pool %s] 'request_slowlog_trace_depth' is not supported on your system", wp->config->name); + warned = 1; + } +#endif + + if (wp->config->request_slowlog_trace_depth <= 0) { + zlog(ZLOG_ERROR, "[pool %s] 'request_slowlog_trace_depth' (%d) must be a positive value", wp->config->name, wp->config->request_slowlog_trace_depth); + return -1; + } + } else { + wp->config->request_slowlog_trace_depth = 20; + } + /* chroot */ if (wp->config->chroot && *wp->config->chroot) { @@ -1250,7 +1275,7 @@ static void fpm_conf_cleanup(int which, void *arg) /* {{{ */ static void fpm_conf_ini_parser_include(char *inc, void *arg) /* {{{ */ { char *filename; - int *error = (int *)arg;; + int *error = (int *)arg; #ifdef HAVE_GLOB glob_t g; #endif @@ -1465,17 +1490,17 @@ static void fpm_conf_ini_parser(zval *arg1, zval *arg2, zval *arg3, int callback switch(callback_type) { case ZEND_INI_PARSER_ENTRY: fpm_conf_ini_parser_entry(arg1, arg2, error); - break;; + break; case ZEND_INI_PARSER_SECTION: fpm_conf_ini_parser_section(arg1, error); - break;; + break; case ZEND_INI_PARSER_POP_ENTRY: fpm_conf_ini_parser_array(arg1, arg3, arg2, error); - break;; + break; default: zlog(ZLOG_ERROR, "[%s:%d] Unknown INI syntax", ini_filename, ini_lineno); *error = 1; - break;; + break; } } /* }}} */ @@ -1635,6 +1660,7 @@ static void fpm_conf_dump() /* {{{ */ zlog(ZLOG_NOTICE, "\taccess.format = %s", STR2STR(wp->config->access_format)); zlog(ZLOG_NOTICE, "\tslowlog = %s", STR2STR(wp->config->slowlog)); zlog(ZLOG_NOTICE, "\trequest_slowlog_timeout = %ds", wp->config->request_slowlog_timeout); + zlog(ZLOG_NOTICE, "\trequest_slowlog_trace_depth = %d", wp->config->request_slowlog_trace_depth); zlog(ZLOG_NOTICE, "\trequest_terminate_timeout = %ds", wp->config->request_terminate_timeout); zlog(ZLOG_NOTICE, "\trlimit_files = %d", wp->config->rlimit_files); zlog(ZLOG_NOTICE, "\trlimit_core = %d", wp->config->rlimit_core); diff --git a/sapi/fpm/fpm/fpm_conf.h b/sapi/fpm/fpm/fpm_conf.h index 540b22795d..d56fcc4e78 100644 --- a/sapi/fpm/fpm/fpm_conf.h +++ b/sapi/fpm/fpm/fpm_conf.h @@ -78,6 +78,7 @@ struct fpm_worker_pool_config_s { char *access_format; char *slowlog; int request_slowlog_timeout; + int request_slowlog_trace_depth; int request_terminate_timeout; int rlimit_files; int rlimit_core; diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index ce9b85620b..dd0269e353 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -280,7 +280,7 @@ static void print_extensions(void) /* {{{ */ #define STDOUT_FILENO 1 #endif -static inline size_t sapi_cgibin_single_write(const char *str, uint str_length) /* {{{ */ +static inline size_t sapi_cgibin_single_write(const char *str, uint32_t str_length) /* {{{ */ { ssize_t ret; @@ -310,7 +310,7 @@ static inline size_t sapi_cgibin_single_write(const char *str, uint str_length) static size_t sapi_cgibin_ub_write(const char *str, size_t str_length) /* {{{ */ { const char *ptr = str; - uint remaining = str_length; + uint32_t remaining = str_length; size_t ret; while (remaining > 0) { @@ -473,7 +473,7 @@ void fcgi_log(int type, const char *fmt, ...) static size_t sapi_cgi_read_post(char *buffer, size_t count_bytes) /* {{{ */ { - uint read_bytes = 0; + uint32_t read_bytes = 0; int tmp_read_bytes; size_t remaining = SG(request_info).content_length - SG(read_post_bytes); @@ -745,7 +745,7 @@ static int sapi_cgi_activate(void) /* {{{ */ { fcgi_request *request = (fcgi_request*) SG(server_context); char *path, *doc_root, *server_name; - uint path_len, doc_root_len, server_name_len; + uint32_t path_len, doc_root_len, server_name_len; /* PATH_TRANSLATED should be defined at this stage but better safe than sorry :) */ if (!SG(request_info).path_translated) { diff --git a/sapi/fpm/fpm/fpm_php_trace.c b/sapi/fpm/fpm/fpm_php_trace.c index 4ab2db6e3f..b5d642f8a6 100644 --- a/sapi/fpm/fpm/fpm_php_trace.c +++ b/sapi/fpm/fpm/fpm_php_trace.c @@ -42,7 +42,7 @@ static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog) /* {{{ */ { - int callers_limit = 20; + int callers_limit = child->wp->config->request_slowlog_trace_depth; pid_t pid = child->pid; struct timeval tv; static const int buf_size = 1024; @@ -80,7 +80,7 @@ static int fpm_php_trace_dump(struct fpm_child_s *child, FILE *slowlog) /* {{{ * long function_name; long file_name; long prev; - uint lineno = 0; + uint32_t lineno = 0; if (0 > fpm_trace_get_long(execute_data + offsetof(zend_execute_data, func), &l)) { return -1; diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index f27bb4afe3..d58a8f82b6 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -246,27 +246,63 @@ enum fpm_address_domain fpm_sockets_domain_from_address(char *address) /* {{{ */ } /* }}} */ -static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* {{{ */ +static int fpm_socket_af_inet_socket_by_addr(struct fpm_worker_pool_s *wp, const char *addr, const char *port) /* {{{ */ { struct addrinfo hints, *servinfo, *p; + char tmpbuf[INET6_ADDRSTRLEN]; + int status; + int sock = -1; + + memset(&hints, 0, sizeof hints); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + + if ((status = getaddrinfo(addr, port, &hints, &servinfo)) != 0) { + zlog(ZLOG_ERROR, "getaddrinfo: %s\n", gai_strerror(status)); + return -1; + } + + for (p = servinfo; p != NULL; p = p->ai_next) { + inet_ntop(p->ai_family, fpm_get_in_addr(p->ai_addr), tmpbuf, INET6_ADDRSTRLEN); + if (sock < 0) { + if ((sock = fpm_sockets_get_listening_socket(wp, p->ai_addr, p->ai_addrlen)) != -1) { + zlog(ZLOG_DEBUG, "Found address for %s, socket opened on %s", addr, tmpbuf); + } + } else { + zlog(ZLOG_WARNING, "Found multiple addresses for %s, %s ignored", addr, tmpbuf); + } + } + + freeaddrinfo(servinfo); + + return sock; +} +/* }}} */ + +static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* {{{ */ +{ char *dup_address = strdup(wp->config->listen_address); char *port_str = strrchr(dup_address, ':'); char *addr = NULL; - char tmpbuf[INET6_ADDRSTRLEN]; int addr_len; int port = 0; int sock = -1; - int status; if (port_str) { /* this is host:port pair */ *port_str++ = '\0'; port = atoi(port_str); addr = dup_address; + + /* strip brackets from address for getaddrinfo */ + addr_len = strlen(addr); + if (addr[0] == '[' && addr[addr_len - 1] == ']') { + addr[addr_len - 1] = '\0'; + addr++; + } + } else if (strlen(dup_address) == strspn(dup_address, "0123456789")) { /* this is port */ port = atoi(dup_address); port_str = dup_address; - /* IPv6 catch-all + IPv4-mapped */ - addr = "::"; } if (port == 0) { @@ -274,36 +310,28 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* return -1; } - /* strip brackets from address for getaddrinfo */ - addr_len = strlen(addr); - if (addr[0] == '[' && addr[addr_len - 1] == ']') { - addr[addr_len - 1] = '\0'; - addr++; - } + if (addr) { + /* Bind a specific address */ + sock = fpm_socket_af_inet_socket_by_addr(wp, addr, port_str); + } else { + /* Bind ANYADDR + * + * Try "::" first as that covers IPv6 ANYADDR and mapped IPv4 ANYADDR + * silencing warnings since failure is an option + * + * If that fails (because AF_INET6 is unsupported) retry with 0.0.0.0 + */ + int old_level = zlog_set_level(ZLOG_ALERT); + sock = fpm_socket_af_inet_socket_by_addr(wp, "::", port_str); + zlog_set_level(old_level); - memset(&hints, 0, sizeof hints); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - - if ((status = getaddrinfo(addr, port_str, &hints, &servinfo)) != 0) { - zlog(ZLOG_ERROR, "getaddrinfo: %s\n", gai_strerror(status)); - free(dup_address); - return -1; - } - - for (p = servinfo; p != NULL; p = p->ai_next) { - inet_ntop(p->ai_family, fpm_get_in_addr(p->ai_addr), tmpbuf, INET6_ADDRSTRLEN); if (sock < 0) { - if ((sock = fpm_sockets_get_listening_socket(wp, p->ai_addr, p->ai_addrlen)) != -1) { - zlog(ZLOG_DEBUG, "Found address for %s, socket opened on %s", addr, tmpbuf); - } - } else { - zlog(ZLOG_WARNING, "Found multiple addresses for %s, %s ignored", addr, tmpbuf); + zlog(ZLOG_NOTICE, "Failed implicitly binding to ::, retrying with 0.0.0.0"); + sock = fpm_socket_af_inet_socket_by_addr(wp, "0.0.0.0", port_str); } } free(dup_address); - freeaddrinfo(servinfo); return sock; } diff --git a/sapi/fpm/tests/013.phpt b/sapi/fpm/tests/013.phpt index 641eb448c4..d28f3e4e00 100644 --- a/sapi/fpm/tests/013.phpt +++ b/sapi/fpm/tests/013.phpt @@ -16,7 +16,6 @@ error_log = $logfile log_level = warning [unconfined] listen = 127.0.0.1:$port -user = foo pm = dynamic pm.max_children = 5 pm.start_servers = 2 diff --git a/sapi/fpm/tests/014.phpt b/sapi/fpm/tests/014.phpt index e243ef68dc..56e24715a8 100644 --- a/sapi/fpm/tests/014.phpt +++ b/sapi/fpm/tests/014.phpt @@ -16,7 +16,6 @@ error_log = $logfile log_level = warning [unconfined] listen = 127.0.0.1:$port -user = foo pm = dynamic pm.max_children = 5 ;pm.start_servers = 2 diff --git a/sapi/fpm/tests/023.phpt b/sapi/fpm/tests/023.phpt new file mode 100644 index 0000000000..13d5cc0a78 --- /dev/null +++ b/sapi/fpm/tests/023.phpt @@ -0,0 +1,57 @@ +--TEST-- +FPM: Test already bound address +--SKIPIF-- +<?php include "skipif.inc"; ?> +--FILE-- +<?php + +include "include.inc"; + +$logfile = dirname(__FILE__).'/php-fpm.log.tmp'; +$port = 9000+PHP_INT_SIZE; + +$cfg = <<<EOT +[global] +log_level = debug +error_log = $logfile +[unconfined] +listen = $port +ping.path = /ping +ping.response = pong +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +EOT; + +// Occupy our port and let things fail +$busy = stream_socket_server("tcp://[::]:$port"); + +$fpm = run_fpm($cfg, $tail); +if (is_resource($fpm)) { + /* Expect two specific lines of log output and show them + * If we get any different number of those patterns, display whole log + */ + $out = $all = ''; + $count = 0; + while (!feof($tail)) { + $line = fgets($tail); + $all .= $line; + if ((false !== strpos($line, 'retrying with 0.0.0.0')) || + (false !== strpos($line, 'unable to bind'))) { + $out .= $line; + ++$count; + } + } + echo ($count == 2) ? $out : $all; +} +?> +--EXPECTF-- +[%d-%s-%d %d:%d:%f] NOTICE: pid %d, fpm_socket_af_inet_listening_socket(), line %d: Failed implicitly binding to ::, retrying with 0.0.0.0 +[%d-%s-%d %d:%d:%f] ERROR: pid %d, fpm_sockets_new_listening_socket(), line %d: unable to bind listening socket for address '%d': %s +--CLEAN-- +<?php + $logfile = dirname(__FILE__).'/php-fpm.log.tmp'; + @unlink($logfile); +?> diff --git a/sapi/fpm/tests/include.inc b/sapi/fpm/tests/include.inc index 8faf53dcc2..1e41957c7c 100644 --- a/sapi/fpm/tests/include.inc +++ b/sapi/fpm/tests/include.inc @@ -38,7 +38,10 @@ function run_fpm($config, &$out = false, $extra_args = '') /* {{{ */ /* Since it's not possible to spawn a process under linux without using a * shell in php (why?!?) we need a little shell trickery, so that we can * actually kill php-fpm */ - $fpm = proc_open('killit () { kill $child; }; trap killit TERM; '.get_fpm_path().' -F -O -y '.$cfg.' '.$extra_args.' 2>&1 & child=$!; wait', $desc, $pipes); + $asroot = getenv('TEST_FPM_RUN_AS_ROOT') ? '--allow-to-run-as-root' : ''; + $cmd = get_fpm_path()." $asroot -F -O -y $cfg $extra_args"; + $fpm = proc_open("killit () { kill \$child; }; trap killit TERM; $cmd 2>&1 & child=\$!; wait", + $desc, $pipes); register_shutdown_function( function($fpm) use($cfg) { @unlink($cfg); diff --git a/sapi/fpm/tests/skipif.inc b/sapi/fpm/tests/skipif.inc index 8c569daafd..08c6bbff69 100644 --- a/sapi/fpm/tests/skipif.inc +++ b/sapi/fpm/tests/skipif.inc @@ -4,10 +4,14 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } + +if (!getmyuid() && !getenv('TEST_FPM_RUN_AS_ROOT')) { + die('Refusing to run as root'); +} + include dirname(__FILE__)."/include.inc"; if (!get_fpm_path()) { die("skip FPM not found"); } - ?> diff --git a/sapi/fpm/www.conf.in b/sapi/fpm/www.conf.in index 975d18cffe..dccff163ba 100644 --- a/sapi/fpm/www.conf.in +++ b/sapi/fpm/www.conf.in @@ -322,6 +322,10 @@ pm.max_spare_servers = 3 ; Default Value: 0 ;request_slowlog_timeout = 0 +; Depth of slow log stack trace. +; Default Value: 20 +;request_slowlog_trace_depth = 20 + ; The timeout for serving a single request after which the worker process will ; be killed. This option should be used when the 'max_execution_time' ini option ; does not stop script execution for some reason. A value of '0' means 'off'. diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 80f6f5edc2..bbd55eaa40 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -695,7 +695,7 @@ static void walk_down_the_path(char* path_start, typedef struct { char *path; - uint path_len; + uint32_t path_len; char *doc_root; user_config_cache_entry *entry; } _lsapi_activate_user_ini_ctx; @@ -739,8 +739,6 @@ static int lsapi_activate_user_ini_mk_path(_lsapi_activate_user_ini_ctx *ctx, /* Extract dir name from path_translated * and store it in 'path' */ ctx->path_len = strlen(ctx->path); path = ctx->path = estrndup(SG(request_info).path_translated, ctx->path_len); - if (!path) - return FAILURE; ctx->path_len = zend_dirname(path, ctx->path_len); DEBUG_MESSAGE("dirname: %s", ctx->path); @@ -824,7 +822,7 @@ static int lsapi_activate_user_ini_walk_down_the_path(_lsapi_activate_user_ini_c void* next) { time_t request_time = sapi_get_request_time(); - uint path_len, docroot_len; + uint32_t path_len, docroot_len; int rc = SUCCESS; fn_activate_user_ini_chain_t *fn_next = next; diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index c7ee88b616..5ef6b59d64 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -381,7 +381,7 @@ static PHP_FUNCTION(phpdbg_break_file) return; } - phpdbg_set_breakpoint_file(file, line); + phpdbg_set_breakpoint_file(file, 0, line); } /* }}} */ /* {{{ proto void phpdbg_break_method(string class, string method) */ @@ -815,15 +815,11 @@ static zend_module_entry sapi_phpdbg_module_entry = { STANDARD_MODULE_PROPERTIES }; -static void phpdbg_interned_strings_nothing(void) { } - static inline int php_sapi_phpdbg_module_startup(sapi_module_struct *module) /* {{{ */ { if (php_module_startup(module, &sapi_phpdbg_module_entry, 1) == FAILURE) { return FAILURE; } - /* prevent zend_interned_strings_restore from invalidating our string pointers too early (in phpdbg allocated memory only gets freed after module shutdown) */ - zend_interned_strings_restore = phpdbg_interned_strings_nothing; phpdbg_booted = 1; @@ -2097,7 +2093,7 @@ phpdbg_out: php_request_shutdown(NULL); } zend_end_try(); - if (PHPDBG_G(exec) && !memcmp("-", PHPDBG_G(exec), 2)) { /* i.e. execution context has been read from stdin - back it up */ + if (PHPDBG_G(exec) && strcmp("Standard input code", PHPDBG_G(exec)) == SUCCESS) { /* i.e. execution context has been read from stdin - back it up */ phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_G(exec_len)); backup_phpdbg_compile = zend_string_alloc(data->len + 2, 1); sprintf(ZSTR_VAL(backup_phpdbg_compile), "?>%.*s", (int) data->len, data->buf); diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index db855fa82c..6edb314582 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -237,12 +237,7 @@ PHPDBG_API void phpdbg_export_breakpoints_to_string(char **str) /* {{{ */ } } /* }}} */ -PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {{{ */ -{ - phpdbg_set_breakpoint_file_ex(path, 0, line_num); -} /* }}} */ - -PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char *path, size_t path_len, long line_num) /* {{{ */ +PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, long line_num) /* {{{ */ { php_stream_statbuf ssb; char realpath[MAXPATHLEN]; @@ -329,7 +324,7 @@ PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char *path, size_t path_len, zend_string_release(path_str); } /* }}} */ -PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht) /* {{{ */ +PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint32_t filelen, zend_string *cur, HashTable *fileht) /* {{{ */ { phpdbg_debug("file: %s, filelen: %u, cur: %s, curlen %u, pos: %c, memcmp: %d\n", file, filelen, ZSTR_VAL(cur), ZSTR_LEN(cur), filelen > ZSTR_LEN(cur) ? file[filelen - ZSTR_LEN(cur) - 1] : '?', filelen > ZSTR_LEN(cur) ? memcmp(file + filelen - ZSTR_LEN(cur), ZSTR_VAL(cur), ZSTR_LEN(cur)) : 0); @@ -378,7 +373,7 @@ PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uin PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file) /* {{{ */ { HashTable *fileht; - uint filelen = strlen(file); + uint32_t filelen = strlen(file); zend_string *cur; phpdbg_debug("was compiled: %s\n", file); diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h index 0d2a527a97..60c67072a9 100644 --- a/sapi/phpdbg/phpdbg_bp.h +++ b/sapi/phpdbg/phpdbg_bp.h @@ -121,12 +121,11 @@ typedef struct _phpdbg_breakcond_t { PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array); PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_op_array *op_array); PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break); -PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht); +PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint32_t filelen, zend_string *cur, HashTable *fileht); PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file); /* }}} */ /* {{{ Breakpoint Creation API */ -PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, long lineno); -PHPDBG_API void phpdbg_set_breakpoint_file_ex(const char* filename, size_t path_len, long lineno); +PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, size_t path_len, long lineno); PHPDBG_API void phpdbg_set_breakpoint_symbol(const char* func_name, size_t func_name_len); PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name); PHPDBG_API void phpdbg_set_breakpoint_opcode(const char* opname, size_t opname_len); diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index 817690322f..d7d7d5561e 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -382,8 +382,8 @@ phpdbg_help_text_t phpdbg_help_text[] = { "Type **help <command>** or (**help alias**) to get detailed help on any of the above commands, " "for example **help list** or **h l**. Note that help will also match partial commands if unique " -"(and list out options if not unique), so **help clea** will give help on the **clean** command, " -"but **help cl** will list the summary for **clean** and **clear**." CR CR +"(and list out options if not unique), so **help exp** will give help on the **export** command, " +"but **help ex** will list the summary for **exec** and **export**." CR CR "Type **help aliases** to show a full alias list, including any registered phpdginit functions" CR "Type **help syntax** for a general introduction to the command syntax." CR @@ -924,7 +924,7 @@ phpdbg_help_text_t phpdbg_help_text[] = { " Enable refcount display when hitting watchpoints" CR CR " $P S b 4 off" CR -" Temporarily disable breakpoint 4. This can be subsequently reenabled by a **s b 4 on**." CR +" Temporarily disable breakpoint 4. This can be subsequently reenabled by a **S b 4 on**." CR //*********** check oplog syntax }, diff --git a/sapi/phpdbg/phpdbg_lexer.c b/sapi/phpdbg/phpdbg_lexer.c index 74cad5b8f2..55bc3275ac 100644 --- a/sapi/phpdbg/phpdbg_lexer.c +++ b/sapi/phpdbg/phpdbg_lexer.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 */ +/* Generated by re2c 0.16 */ #line 1 "sapi/phpdbg/phpdbg_lexer.l" /* * phpdbg_lexer.l @@ -121,52 +121,31 @@ yyc_INITIAL: YYDEBUG(1, *YYCURSOR); YYFILL(4); yych = *YYCURSOR; - if (yych <= '#') { - if (yych <= '\f') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy9; - goto yy14; - } else { - if (yych <= '\t') goto yy3; - if (yych <= '\n') goto yy9; - goto yy14; - } + if (yych <= 'E') { + if (yych <= '\r') { + if (yych == '\t') goto yy5; + if (yych >= '\r') goto yy5; } else { - if (yych <= 0x1F) { - if (yych >= 0x0E) goto yy14; - } else { - if (yych <= ' ') goto yy5; - if (yych <= '"') goto yy14; - goto yy8; - } + if (yych == ' ') goto yy6; + if (yych >= 'E') goto yy9; } } else { - if (yych <= 'S') { - if (yych <= 'E') { - if (yych <= 'D') goto yy14; - goto yy10; - } else { - if (yych <= 'Q') goto yy14; - if (yych <= 'R') goto yy13; - goto yy11; - } + if (yych <= 'd') { + if (yych <= 'Q') goto yy3; + if (yych <= 'R') goto yy10; + if (yych <= 'S') goto yy11; } else { if (yych <= 'q') { - if (yych == 'e') goto yy10; - goto yy14; + if (yych <= 'e') goto yy9; } else { if (yych <= 'r') goto yy12; if (yych <= 's') goto yy11; - goto yy14; } } } yy3: YYDEBUG(3, *YYCURSOR); ++YYCURSOR; - if (yybm[0+(yych = *YYCURSOR)] & 128) { - goto yy5; - } yy4: YYDEBUG(4, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; @@ -177,17 +156,24 @@ yy4: YYCURSOR = LEX(text); goto restart; } -#line 181 "sapi/phpdbg/phpdbg_lexer.c" +#line 160 "sapi/phpdbg/phpdbg_lexer.c" yy5: YYDEBUG(5, *YYCURSOR); + yych = *++YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy6; + } + goto yy4; +yy6: + YYDEBUG(6, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(6, *YYCURSOR); + YYDEBUG(7, *YYCURSOR); if (yybm[0+yych] & 128) { - goto yy5; + goto yy6; } - YYDEBUG(7, *YYCURSOR); + YYDEBUG(8, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 175 "sapi/phpdbg/phpdbg_lexer.l" { @@ -195,44 +181,39 @@ yy5: goto restart; } -#line 199 "sapi/phpdbg/phpdbg_lexer.c" -yy8: - YYDEBUG(8, *YYCURSOR); - yych = *++YYCURSOR; - goto yy4; +#line 185 "sapi/phpdbg/phpdbg_lexer.c" yy9: YYDEBUG(9, *YYCURSOR); - yych = *++YYCURSOR; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'V') goto yy13; + if (yych == 'v') goto yy13; goto yy4; yy10: YYDEBUG(10, *YYCURSOR); - yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'V') goto yy25; - if (yych == 'v') goto yy25; + if (yych == 'U') goto yy15; + if (yych == 'u') goto yy15; goto yy4; yy11: YYDEBUG(11, *YYCURSOR); - yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'H') goto yy21; - if (yych == 'h') goto yy21; + if (yych == 'H') goto yy16; + if (yych == 'h') goto yy16; goto yy4; yy12: YYDEBUG(12, *YYCURSOR); - yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 0x1F) { if (yych <= '\t') { if (yych <= 0x08) goto yy4; - goto yy18; + goto yy17; } else { - if (yych == '\r') goto yy18; + if (yych == '\r') goto yy17; goto yy4; } } else { if (yych <= 'U') { - if (yych <= ' ') goto yy18; + if (yych <= ' ') goto yy17; if (yych <= 'T') goto yy4; goto yy15; } else { @@ -242,46 +223,47 @@ yy12: } yy13: YYDEBUG(13, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy15; - if (yych == 'u') goto yy15; - goto yy4; + yych = *++YYCURSOR; + if (yych <= '\f') { + if (yych == '\t') goto yy20; + } else { + if (yych <= '\r') goto yy20; + if (yych == ' ') goto yy20; + } yy14: YYDEBUG(14, *YYCURSOR); - yych = *++YYCURSOR; + YYCURSOR = YYMARKER; goto yy4; yy15: YYDEBUG(15, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy17; - if (yych == 'n') goto yy17; + if (yych == 'N') goto yy23; + if (yych == 'n') goto yy23; + goto yy14; yy16: YYDEBUG(16, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy4; -yy17: - YYDEBUG(17, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\f') { - if (yych != '\t') goto yy16; + if (yych == '\t') goto yy24; + goto yy14; } else { - if (yych <= '\r') goto yy18; - if (yych != ' ') goto yy16; + if (yych <= '\r') goto yy24; + if (yych == ' ') goto yy24; + goto yy14; } -yy18: - YYDEBUG(18, *YYCURSOR); +yy17: + YYDEBUG(17, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(19, *YYCURSOR); + YYDEBUG(18, *YYCURSOR); if (yych <= '\f') { - if (yych == '\t') goto yy18; + if (yych == '\t') goto yy17; } else { - if (yych <= '\r') goto yy18; - if (yych == ' ') goto yy18; + if (yych <= '\r') goto yy17; + if (yych == ' ') goto yy17; } - YYDEBUG(20, *YYCURSOR); + YYDEBUG(19, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 193 "sapi/phpdbg/phpdbg_lexer.l" { @@ -289,154 +271,146 @@ yy18: phpdbg_init_param(yylval, EMPTY_PARAM); return T_RUN; } -#line 293 "sapi/phpdbg/phpdbg_lexer.c" -yy21: - YYDEBUG(21, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\f') { - if (yych != '\t') goto yy16; - } else { - if (yych <= '\r') goto yy22; - if (yych != ' ') goto yy16; - } -yy22: - YYDEBUG(22, *YYCURSOR); +#line 275 "sapi/phpdbg/phpdbg_lexer.c" +yy20: + YYDEBUG(20, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(23, *YYCURSOR); + YYDEBUG(21, *YYCURSOR); if (yych <= '\f') { - if (yych == '\t') goto yy22; + if (yych == '\t') goto yy20; } else { - if (yych <= '\r') goto yy22; - if (yych == ' ') goto yy22; + if (yych <= '\r') goto yy20; + if (yych == ' ') goto yy20; } - YYDEBUG(24, *YYCURSOR); + YYDEBUG(22, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 187 "sapi/phpdbg/phpdbg_lexer.l" +#line 181 "sapi/phpdbg/phpdbg_lexer.l" { YYSETCONDITION(PRE_RAW); phpdbg_init_param(yylval, EMPTY_PARAM); - return T_SHELL; + return T_EVAL; } -#line 323 "sapi/phpdbg/phpdbg_lexer.c" -yy25: - YYDEBUG(25, *YYCURSOR); +#line 296 "sapi/phpdbg/phpdbg_lexer.c" +yy23: + YYDEBUG(23, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\f') { - if (yych != '\t') goto yy16; + if (yych == '\t') goto yy17; + goto yy14; } else { - if (yych <= '\r') goto yy26; - if (yych != ' ') goto yy16; + if (yych <= '\r') goto yy17; + if (yych == ' ') goto yy17; + goto yy14; } -yy26: - YYDEBUG(26, *YYCURSOR); +yy24: + YYDEBUG(24, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(27, *YYCURSOR); + YYDEBUG(25, *YYCURSOR); if (yych <= '\f') { - if (yych == '\t') goto yy26; + if (yych == '\t') goto yy24; } else { - if (yych <= '\r') goto yy26; - if (yych == ' ') goto yy26; + if (yych <= '\r') goto yy24; + if (yych == ' ') goto yy24; } - YYDEBUG(28, *YYCURSOR); + YYDEBUG(26, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 181 "sapi/phpdbg/phpdbg_lexer.l" +#line 187 "sapi/phpdbg/phpdbg_lexer.l" { YYSETCONDITION(PRE_RAW); phpdbg_init_param(yylval, EMPTY_PARAM); - return T_EVAL; + return T_SHELL; } -#line 353 "sapi/phpdbg/phpdbg_lexer.c" +#line 328 "sapi/phpdbg/phpdbg_lexer.c" } /* *********************************** */ yyc_NORMAL: { static const unsigned char yybm[] = { /* table 1 .. 8: 0 */ - 0, 242, 242, 242, 242, 242, 242, 242, - 242, 160, 0, 242, 242, 160, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 160, 242, 50, 160, 242, 242, 242, 194, - 242, 242, 242, 242, 242, 242, 243, 242, - 251, 251, 251, 251, 251, 251, 251, 251, - 251, 251, 160, 242, 242, 242, 242, 242, - 242, 254, 254, 254, 254, 254, 254, 246, - 246, 246, 246, 246, 246, 246, 246, 246, - 246, 246, 246, 246, 246, 246, 246, 246, - 246, 246, 246, 242, 2, 242, 242, 242, - 242, 254, 254, 254, 254, 254, 254, 246, - 246, 246, 246, 246, 246, 246, 246, 246, - 246, 246, 246, 246, 246, 246, 246, 246, - 246, 246, 246, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, + 0, 62, 62, 62, 62, 62, 62, 62, + 62, 40, 0, 62, 62, 40, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 40, 62, 50, 40, 62, 62, 62, 14, + 62, 62, 62, 62, 62, 62, 63, 62, + 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 40, 62, 62, 62, 62, 62, + 62, 254, 254, 254, 254, 254, 254, 190, + 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 62, 2, 62, 62, 62, + 62, 254, 254, 254, 254, 254, 254, 190, + 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, /* table 9 .. 10: 256 */ - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 64, 0, 128, 128, 64, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 64, 128, 0, 0, 128, 128, 128, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, + 0, 64, 64, 64, 64, 64, 64, 64, + 64, 128, 0, 64, 64, 128, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 128, 64, 0, 0, 64, 64, 64, 0, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 0, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, }; - YYDEBUG(29, *YYCURSOR); + YYDEBUG(27, *YYCURSOR); YYFILL(11); yych = *YYCURSOR; - if (yybm[256+yych] & 64) { - goto yy31; + if (yybm[256+yych] & 128) { + goto yy34; } - YYDEBUG(-1, yych); switch (yych) { case 0x00: case '\t': - case '\n': goto yy36; - case '"': goto yy44; - case '#': goto yy34; - case '\'': goto yy46; - case '-': goto yy38; + case '\n': goto yy29; + case '"': goto yy37; + case '#': goto yy39; + case '\'': goto yy41; + case '-': goto yy42; case '.': case '1': case '2': @@ -446,91 +420,57 @@ yyc_NORMAL: case '6': case '7': case '8': - case '9': goto yy47; - case '0': goto yy50; - case ':': goto yy41; + case '9': goto yy43; + case '0': goto yy46; + case ':': goto yy47; case 'D': - case 'd': goto yy51; + case 'd': goto yy48; case 'E': - case 'e': goto yy52; + case 'e': goto yy49; case 'F': - case 'f': goto yy53; + case 'f': goto yy50; case 'I': - case 'i': goto yy40; + case 'i': goto yy51; case 'N': - case 'n': goto yy54; + case 'n': goto yy52; case 'O': - case 'o': goto yy55; + case 'o': goto yy53; case 'T': - case 't': goto yy56; + case 't': goto yy54; case 'Y': - case 'y': goto yy57; - case 'Z': goto yy58; - case 'z': goto yy59; - default: goto yy42; + case 'y': goto yy55; + case 'Z': goto yy56; + case 'z': goto yy57; + default: goto yy31; } +yy29: + YYDEBUG(29, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(30, *YYCURSOR); + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 89 "sapi/phpdbg/phpdbg_lexer.l" + { + return 0; +} +#line 456 "sapi/phpdbg/phpdbg_lexer.c" yy31: YYDEBUG(31, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); + yyaccept = 0; + YYMARKER = ++YYCURSOR; + YYFILL(3); yych = *YYCURSOR; +yy32: YYDEBUG(32, *YYCURSOR); if (yybm[256+yych] & 64) { goto yy31; } + if (yych <= ' ') goto yy33; + if (yych == '#') goto yy33; + if (yych <= '\'') goto yy58; + goto yy60; +yy33: YYDEBUG(33, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 175 "sapi/phpdbg/phpdbg_lexer.l" - { - /* ignore whitespace */ - - goto restart; -} -#line 490 "sapi/phpdbg/phpdbg_lexer.c" -yy34: - YYDEBUG(34, *YYCURSOR); - YYCTXMARKER = YYCURSOR + 1; - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy35; - if (yych <= '-') goto yy146; - goto yy147; - } else { - if (yych <= '/') goto yy35; - if (yych <= '9') goto yy147; - } -yy35: - YYDEBUG(35, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 110 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(INITIAL); - return T_SEPARATOR; -} -#line 512 "sapi/phpdbg/phpdbg_lexer.c" -yy36: - YYDEBUG(36, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(37, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 89 "sapi/phpdbg/phpdbg_lexer.l" - { - return 0; -} -#line 522 "sapi/phpdbg/phpdbg_lexer.c" -yy38: - YYDEBUG(38, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 1) { - goto yy47; - } - if (yych == 'r') goto yy136; - goto yy43; -yy39: - YYDEBUG(39, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 161 "sapi/phpdbg/phpdbg_lexer.l" { phpdbg_init_param(yylval, STR_PARAM); @@ -538,106 +478,126 @@ yy39: yylval->len = yyleng; return T_ID; } -#line 542 "sapi/phpdbg/phpdbg_lexer.c" -yy40: - YYDEBUG(40, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'F') goto yy132; - if (yych == 'f') goto yy132; - goto yy43; -yy41: - YYDEBUG(41, *YYCURSOR); - YYCTXMARKER = YYCURSOR + 1; - yych = *++YYCURSOR; - if (yych == ':') goto yy130; - if (yych == '\\') goto yy68; - goto yy128; -yy42: - YYDEBUG(42, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - YYFILL(3); +#line 482 "sapi/phpdbg/phpdbg_lexer.c" +yy34: + YYDEBUG(34, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); yych = *YYCURSOR; -yy43: - YYDEBUG(43, *YYCURSOR); + YYDEBUG(35, *YYCURSOR); if (yybm[256+yych] & 128) { - goto yy42; + goto yy34; } - if (yych <= ' ') goto yy39; - if (yych == '#') goto yy39; - if (yych <= '\'') goto yy62; - goto yy61; -yy44: - YYDEBUG(44, *YYCURSOR); + YYDEBUG(36, *YYCURSOR); + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 175 "sapi/phpdbg/phpdbg_lexer.l" + { + /* ignore whitespace */ + + goto restart; +} +#line 500 "sapi/phpdbg/phpdbg_lexer.c" +yy37: + YYDEBUG(37, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '"') goto yy62; - goto yy120; -yy45: - YYDEBUG(45, *YYCURSOR); + if (yych == '"') goto yy58; + goto yy62; +yy38: + YYDEBUG(38, *YYCURSOR); YYCURSOR = YYMARKER; if (yyaccept <= 3) { if (yyaccept <= 1) { if (yyaccept == 0) { - goto yy35; + goto yy33; } else { - goto yy39; + goto yy40; } } else { if (yyaccept == 2) { - goto yy49; + goto yy45; } else { - goto yy76; + goto yy109; } } } else { if (yyaccept <= 5) { if (yyaccept == 4) { - goto yy107; + goto yy112; } else { - goto yy67; + goto yy128; } } else { - goto yy142; + goto yy145; } } -yy46: - YYDEBUG(46, *YYCURSOR); +yy39: + YYDEBUG(39, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYCTXMARKER = YYCURSOR; + if (yych <= '.') { + if (yych <= ',') goto yy40; + if (yych <= '-') goto yy67; + goto yy68; + } else { + if (yych <= '/') goto yy40; + if (yych <= '9') goto yy68; + } +yy40: + YYDEBUG(40, *YYCURSOR); + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 110 "sapi/phpdbg/phpdbg_lexer.l" + { + YYSETCONDITION(INITIAL); + return T_SEPARATOR; +} +#line 555 "sapi/phpdbg/phpdbg_lexer.c" +yy41: + YYDEBUG(41, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\'') goto yy62; - goto yy109; -yy47: - YYDEBUG(47, *YYCURSOR); + if (yych == '\'') goto yy58; + goto yy72; +yy42: + YYDEBUG(42, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[0+yych] & 1) { + goto yy43; + } + if (yych == 'r') goto yy77; + goto yy32; +yy43: + YYDEBUG(43, *YYCURSOR); yyaccept = 2; YYMARKER = ++YYCURSOR; YYFILL(3); yych = *YYCURSOR; - YYDEBUG(48, *YYCURSOR); + YYDEBUG(44, *YYCURSOR); if (yybm[0+yych] & 1) { - goto yy47; + goto yy43; } if (yych <= ' ') { if (yych <= '\n') { - if (yych <= 0x00) goto yy49; - if (yych <= 0x08) goto yy42; + if (yych <= 0x00) goto yy45; + if (yych <= 0x08) goto yy31; } else { - if (yych == '\r') goto yy49; - if (yych <= 0x1F) goto yy42; + if (yych == '\r') goto yy45; + if (yych <= 0x1F) goto yy31; } } else { if (yych <= '&') { - if (yych <= '!') goto yy42; - if (yych <= '"') goto yy62; - if (yych >= '$') goto yy42; + if (yych <= '!') goto yy31; + if (yych <= '"') goto yy58; + if (yych >= '$') goto yy31; } else { - if (yych <= '\'') goto yy62; - if (yych <= '/') goto yy42; - if (yych <= ':') goto yy61; - goto yy42; + if (yych <= '\'') goto yy58; + if (yych <= '/') goto yy31; + if (yych <= ':') goto yy60; + goto yy31; } } -yy49: - YYDEBUG(49, *YYCURSOR); +yy45: + YYDEBUG(45, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 142 "sapi/phpdbg/phpdbg_lexer.l" { @@ -645,454 +605,639 @@ yy49: yylval->num = atoi(yytext); return T_DIGITS; } -#line 649 "sapi/phpdbg/phpdbg_lexer.c" -yy50: - YYDEBUG(50, *YYCURSOR); +#line 609 "sapi/phpdbg/phpdbg_lexer.c" +yy46: + YYDEBUG(46, *YYCURSOR); yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 1) { - goto yy47; + goto yy43; } if (yych <= 0x1F) { if (yych <= '\n') { - if (yych <= 0x00) goto yy49; - if (yych <= 0x08) goto yy43; - goto yy49; + if (yych <= 0x00) goto yy45; + if (yych <= 0x08) goto yy32; + goto yy45; } else { - if (yych == '\r') goto yy49; - goto yy43; + if (yych == '\r') goto yy45; + goto yy32; } } else { if (yych <= '#') { - if (yych <= ' ') goto yy49; - if (yych <= '"') goto yy43; - goto yy49; + if (yych <= ' ') goto yy45; + if (yych <= '"') goto yy32; + goto yy45; } else { - if (yych == 'x') goto yy104; - goto yy43; + if (yych == 'x') goto yy78; + goto yy32; } } +yy47: + YYDEBUG(47, *YYCURSOR); + yych = *++YYCURSOR; + YYCTXMARKER = YYCURSOR; + if (yych == ':') goto yy81; + if (yych == '\\') goto yy83; + goto yy79; +yy48: + YYDEBUG(48, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'I') goto yy85; + if (yych == 'i') goto yy85; + goto yy32; +yy49: + YYDEBUG(49, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'N') goto yy86; + if (yych == 'n') goto yy86; + goto yy32; +yy50: + YYDEBUG(50, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'A') goto yy87; + if (yych == 'a') goto yy87; + goto yy32; yy51: YYDEBUG(51, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'I') goto yy98; - if (yych == 'i') goto yy98; - goto yy43; + if (yych == 'F') goto yy88; + if (yych == 'f') goto yy88; + goto yy32; yy52: YYDEBUG(52, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'N') goto yy93; - if (yych == 'n') goto yy93; - goto yy43; + if (yych == 'O') goto yy89; + if (yych == 'o') goto yy89; + goto yy32; yy53: YYDEBUG(53, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'A') goto yy90; - if (yych == 'a') goto yy90; - goto yy43; -yy54: - YYDEBUG(54, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'O') goto yy87; - if (yych == 'o') goto yy87; - goto yy43; -yy55: - YYDEBUG(55, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'N') { - if (yych == 'F') goto yy86; - if (yych <= 'M') goto yy43; - goto yy81; + if (yych == 'F') goto yy90; + if (yych <= 'M') goto yy32; + goto yy91; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy43; - goto yy86; + if (yych <= 'e') goto yy32; + goto yy90; } else { - if (yych == 'n') goto yy81; - goto yy43; + if (yych == 'n') goto yy91; + goto yy32; } } +yy54: + YYDEBUG(54, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'R') goto yy92; + if (yych == 'r') goto yy92; + goto yy32; +yy55: + YYDEBUG(55, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy93; + if (yych == 'e') goto yy93; + goto yy32; yy56: YYDEBUG(56, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy84; - if (yych == 'r') goto yy84; - goto yy43; + if (yych == 'E') goto yy94; + goto yy32; yy57: YYDEBUG(57, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy80; - if (yych == 'e') goto yy80; - goto yy43; + if (yych == 'e') goto yy95; + goto yy32; yy58: YYDEBUG(58, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy77; - goto yy43; + ++YYCURSOR; + YYFILL(3); + yych = *YYCURSOR; yy59: YYDEBUG(59, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != 'e') goto yy43; + if (yybm[0+yych] & 2) { + goto yy58; + } + if (yych <= '#') goto yy38; + goto yy96; +yy60: YYDEBUG(60, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'n') goto yy71; - goto yy43; + yych = *++YYCURSOR; + if (yych == '/') goto yy97; + if (yych == '\\') goto yy83; + goto yy38; yy61: YYDEBUG(61, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy65; - if (yych == '\\') goto yy68; - goto yy45; -yy62: - YYDEBUG(62, *YYCURSOR); ++YYCURSOR; - YYFILL(3); + YYFILL(4); yych = *YYCURSOR; +yy62: + YYDEBUG(62, *YYCURSOR); + if (yybm[0+yych] & 4) { + goto yy61; + } + if (yych <= ' ') { + if (yych <= 0x00) goto yy38; + if (yych == '\n') goto yy38; + } else { + if (yych <= '"') goto yy98; + if (yych <= '#') goto yy63; + if (yych <= ':') goto yy65; + goto yy66; + } yy63: YYDEBUG(63, *YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy62; - } - if (yych <= '#') goto yy45; + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; yy64: YYDEBUG(64, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '/') goto yy45; + if (yybm[0+yych] & 8) { + goto yy63; + } + if (yych <= '\n') goto yy38; + if (yych <= '"') goto yy99; + goto yy100; yy65: YYDEBUG(65, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy45; + if (yych == '/') goto yy101; + goto yy64; +yy66: YYDEBUG(66, *YYCURSOR); ++YYCURSOR; -yy67: - YYDEBUG(67, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 123 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, STR_PARAM); - yylval->str = estrndup(yytext, yyleng); - yylval->len = yyleng; - return T_PROTO; -} -#line 788 "sapi/phpdbg/phpdbg_lexer.c" -yy68: - YYDEBUG(68, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - YYFILL(1); + YYFILL(3); yych = *YYCURSOR; - YYDEBUG(69, *YYCURSOR); if (yych <= ' ') { if (yych <= '\n') { - if (yych <= 0x00) goto yy39; - if (yych <= 0x08) goto yy68; - goto yy39; + if (yych <= 0x00) goto yy38; + if (yych <= 0x08) goto yy58; + goto yy38; } else { - if (yych == '\r') goto yy39; - if (yych <= 0x1F) goto yy68; - goto yy39; + if (yych == '\r') goto yy38; + if (yych <= 0x1F) goto yy58; + goto yy38; } } else { - if (yych <= '&') { - if (yych <= '!') goto yy68; - if (yych <= '#') goto yy39; - goto yy68; + if (yych <= '9') { + if (yych <= '!') goto yy58; + if (yych <= '"') goto yy61; + if (yych <= '#') goto yy38; + goto yy58; } else { - if (yych <= '\'') goto yy39; - if (yych != ':') goto yy68; + if (yych <= ':') goto yy96; + if (yych == '\\') goto yy61; + goto yy58; } } - YYDEBUG(70, *YYCURSOR); +yy67: + YYDEBUG(67, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == '.') goto yy68; + if (yych <= '/') goto yy38; + if (yych >= ':') goto yy38; +yy68: + YYDEBUG(68, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - if (yych == '\\') goto yy68; - goto yy45; + YYDEBUG(69, *YYCURSOR); + if (yych == '.') goto yy68; + if (yych <= '/') goto yy70; + if (yych <= '9') goto yy68; +yy70: + YYDEBUG(70, *YYCURSOR); + YYCURSOR = YYCTXMARKER; + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 106 "sapi/phpdbg/phpdbg_lexer.l" + { + return T_POUND; +} +#line 826 "sapi/phpdbg/phpdbg_lexer.c" yy71: YYDEBUG(71, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != 'd') goto yy43; + ++YYCURSOR; + YYFILL(4); + yych = *YYCURSOR; +yy72: YYDEBUG(72, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != '_') goto yy43; + if (yybm[0+yych] & 16) { + goto yy71; + } + if (yych <= '\n') { + if (yych <= 0x00) goto yy38; + if (yych >= '\n') goto yy38; + } else { + if (yych <= '#') goto yy73; + if (yych <= '\'') goto yy98; + if (yych <= ':') goto yy75; + goto yy76; + } yy73: YYDEBUG(73, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy74; - } - goto yy43; + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; yy74: YYDEBUG(74, *YYCURSOR); - yyaccept = 3; - YYMARKER = ++YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy73; + } + if (yych <= '\n') goto yy38; + if (yych <= '\'') goto yy99; + goto yy102; +yy75: + YYDEBUG(75, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == '/') goto yy103; + goto yy74; +yy76: + YYDEBUG(76, *YYCURSOR); + ++YYCURSOR; YYFILL(3); yych = *YYCURSOR; - YYDEBUG(75, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy74; - } - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy76; - if (yych <= 0x08) goto yy42; + if (yych <= '"') { + if (yych <= '\f') { + if (yych <= 0x00) goto yy38; + if (yych <= 0x08) goto yy58; + if (yych <= '\n') goto yy38; + goto yy58; } else { - if (yych == '\r') goto yy76; - if (yych <= 0x1F) goto yy42; + if (yych <= '\r') goto yy38; + if (yych == ' ') goto yy38; + goto yy58; } } else { - if (yych <= '&') { - if (yych <= '!') goto yy42; - if (yych <= '"') goto yy62; - if (yych >= '$') goto yy42; + if (yych <= '9') { + if (yych <= '#') goto yy38; + if (yych == '\'') goto yy71; + goto yy58; } else { - if (yych <= '\'') goto yy62; - if (yych == ':') goto yy61; - goto yy42; + if (yych <= ':') goto yy96; + if (yych == '\\') goto yy71; + goto yy58; } } -yy76: - YYDEBUG(76, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 154 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, OP_PARAM); - yylval->str = estrndup(yytext, yyleng); - yylval->len = yyleng; - return T_OPCODE; -} -#line 878 "sapi/phpdbg/phpdbg_lexer.c" yy77: YYDEBUG(77, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych != 'N') goto yy43; + if (yych <= ' ') { + if (yych <= '\f') { + if (yych == '\t') goto yy104; + goto yy32; + } else { + if (yych <= '\r') goto yy104; + if (yych <= 0x1F) goto yy32; + goto yy104; + } + } else { + if (yych <= '.') { + if (yych <= ',') goto yy32; + if (yych <= '-') goto yy106; + goto yy107; + } else { + if (yych <= '/') goto yy32; + if (yych <= '9') goto yy107; + goto yy32; + } + } +yy78: YYDEBUG(78, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych != 'D') goto yy43; + if (yybm[0+yych] & 64) { + goto yy110; + } + goto yy32; +yy79: YYDEBUG(79, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '_') goto yy73; - goto yy43; -yy80: + ++YYCURSOR; YYDEBUG(80, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy81; - if (yych != 's') goto yy43; + YYCURSOR = YYCTXMARKER; + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 119 "sapi/phpdbg/phpdbg_lexer.l" + { + return T_COLON; +} +#line 933 "sapi/phpdbg/phpdbg_lexer.c" yy81: YYDEBUG(81, *YYCURSOR); - YYCTXMARKER = YYCURSOR + 1; - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\f') { - if (yych <= 0x00) goto yy82; - if (yych <= 0x08) goto yy43; - if (yych >= '\v') goto yy43; - } else { - if (yych <= '\r') goto yy82; - if (yych != ' ') goto yy43; - } -yy82: - YYDEBUG(82, *YYCURSOR); ++YYCURSOR; - YYDEBUG(83, *YYCURSOR); - YYCURSOR = YYCTXMARKER; + YYDEBUG(82, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 130 "sapi/phpdbg/phpdbg_lexer.l" +#line 115 "sapi/phpdbg/phpdbg_lexer.l" { - phpdbg_init_param(yylval, NUMERIC_PARAM); - yylval->num = 1; - return T_TRUTHY; + return T_DCOLON; } -#line 924 "sapi/phpdbg/phpdbg_lexer.c" -yy84: +#line 943 "sapi/phpdbg/phpdbg_lexer.c" +yy83: + YYDEBUG(83, *YYCURSOR); + yyaccept = 0; + YYMARKER = ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; YYDEBUG(84, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy85; - if (yych != 'u') goto yy43; + if (yych <= ' ') { + if (yych <= '\n') { + if (yych <= 0x00) goto yy33; + if (yych <= 0x08) goto yy83; + goto yy33; + } else { + if (yych == '\r') goto yy33; + if (yych <= 0x1F) goto yy83; + goto yy33; + } + } else { + if (yych <= '&') { + if (yych <= '!') goto yy83; + if (yych <= '#') goto yy33; + goto yy83; + } else { + if (yych <= '\'') goto yy33; + if (yych == ':') goto yy113; + goto yy83; + } + } yy85: YYDEBUG(85, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy81; - if (yych == 'e') goto yy81; - goto yy43; + if (yych == 'S') goto yy114; + if (yych == 's') goto yy114; + goto yy32; yy86: YYDEBUG(86, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'F') goto yy87; - if (yych != 'f') goto yy43; + if (yych == 'A') goto yy115; + if (yych == 'a') goto yy115; + goto yy32; yy87: YYDEBUG(87, *YYCURSOR); - YYCTXMARKER = YYCURSOR + 1; - yyaccept = 1; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'L') goto yy116; + if (yych == 'l') goto yy116; + goto yy32; +yy88: + YYDEBUG(88, *YYCURSOR); + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '\f') { - if (yych <= 0x00) goto yy88; - if (yych <= 0x08) goto yy43; - if (yych >= '\v') goto yy43; + if (yych == '\t') goto yy117; + goto yy32; } else { - if (yych <= '\r') goto yy88; - if (yych != ' ') goto yy43; + if (yych <= '\r') goto yy117; + if (yych == ' ') goto yy117; + goto yy32; } -yy88: - YYDEBUG(88, *YYCURSOR); - ++YYCURSOR; +yy89: YYDEBUG(89, *YYCURSOR); - YYCURSOR = YYCTXMARKER; - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 136 "sapi/phpdbg/phpdbg_lexer.l" - { - phpdbg_init_param(yylval, NUMERIC_PARAM); - yylval->num = 0; - return T_FALSY; -} -#line 969 "sapi/phpdbg/phpdbg_lexer.c" + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + YYCTXMARKER = YYCURSOR; + if (yych <= '\f') { + if (yych <= 0x00) goto yy120; + if (yych <= 0x08) goto yy32; + if (yych <= '\n') goto yy120; + goto yy32; + } else { + if (yych <= '\r') goto yy120; + if (yych == ' ') goto yy120; + goto yy32; + } yy90: YYDEBUG(90, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'L') goto yy91; - if (yych != 'l') goto yy43; + if (yych == 'F') goto yy89; + if (yych == 'f') goto yy89; + goto yy32; yy91: YYDEBUG(91, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy92; - if (yych != 's') goto yy43; + YYCTXMARKER = YYCURSOR; + if (yych <= '\f') { + if (yych <= 0x00) goto yy122; + if (yych <= 0x08) goto yy32; + if (yych <= '\n') goto yy122; + goto yy32; + } else { + if (yych <= '\r') goto yy122; + if (yych == ' ') goto yy122; + goto yy32; + } yy92: YYDEBUG(92, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy87; - if (yych == 'e') goto yy87; - goto yy43; + if (yych == 'U') goto yy124; + if (yych == 'u') goto yy124; + goto yy32; yy93: YYDEBUG(93, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'A') goto yy94; - if (yych != 'a') goto yy43; + if (yych == 'S') goto yy91; + if (yych == 's') goto yy91; + goto yy32; yy94: YYDEBUG(94, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'B') goto yy95; - if (yych != 'b') goto yy43; + if (yych == 'N') goto yy125; + goto yy32; yy95: YYDEBUG(95, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'L') goto yy96; - if (yych != 'l') goto yy43; + if (yych == 'n') goto yy126; + goto yy32; yy96: YYDEBUG(96, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy97; - if (yych != 'e') goto yy43; + yych = *++YYCURSOR; + if (yych != '/') goto yy38; yy97: YYDEBUG(97, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy81; - if (yych == 'd') goto yy81; - goto yy43; + yych = *++YYCURSOR; + if (yych == '/') goto yy127; + goto yy38; yy98: YYDEBUG(98, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy99; - if (yych != 's') goto yy43; + if (yych <= '\r') { + if (yych <= 0x08) { + if (yych <= 0x00) goto yy33; + goto yy59; + } else { + if (yych <= '\n') goto yy33; + if (yych <= '\f') goto yy59; + goto yy33; + } + } else { + if (yych <= ' ') { + if (yych <= 0x1F) goto yy59; + goto yy33; + } else { + if (yych == '#') goto yy33; + goto yy59; + } + } yy99: YYDEBUG(99, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'A') goto yy100; - if (yych != 'a') goto yy43; + yych = *++YYCURSOR; + goto yy33; yy100: YYDEBUG(100, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'B') goto yy101; - if (yych != 'b') goto yy43; + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; + if (yych == '"') goto yy63; + if (yych == '\\') goto yy63; + goto yy38; yy101: YYDEBUG(101, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'L') goto yy102; - if (yych != 'l') goto yy43; + yych = *++YYCURSOR; + if (yych == '/') goto yy129; + goto yy64; yy102: YYDEBUG(102, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy103; - if (yych != 'e') goto yy43; + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; + if (yych == '\'') goto yy73; + if (yych == '\\') goto yy73; + goto yy38; yy103: YYDEBUG(103, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy87; - if (yych == 'd') goto yy87; - goto yy43; + yych = *++YYCURSOR; + if (yych == '/') goto yy130; + goto yy74; yy104: YYDEBUG(104, *YYCURSOR); - yyaccept = 1; + ++YYCURSOR; + YYFILL(2); + yych = *YYCURSOR; + YYDEBUG(105, *YYCURSOR); + if (yych <= ' ') { + if (yych <= '\f') { + if (yych == '\t') goto yy104; + goto yy38; + } else { + if (yych <= '\r') goto yy104; + if (yych <= 0x1F) goto yy38; + goto yy104; + } + } else { + if (yych <= '.') { + if (yych <= ',') goto yy38; + if (yych <= '-') goto yy131; + goto yy132; + } else { + if (yych <= '/') goto yy38; + if (yych <= '9') goto yy132; + goto yy38; + } + } +yy106: + YYDEBUG(106, *YYCURSOR); + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy105; + if (yych == '.') goto yy107; + if (yych <= '/') goto yy32; + if (yych >= ':') goto yy32; +yy107: + YYDEBUG(107, *YYCURSOR); + yyaccept = 3; + YYMARKER = ++YYCURSOR; + YYFILL(3); + yych = *YYCURSOR; + YYDEBUG(108, *YYCURSOR); + if (yych <= '"') { + if (yych <= '\f') { + if (yych <= 0x00) goto yy109; + if (yych <= 0x08) goto yy31; + if (yych >= '\v') goto yy31; + } else { + if (yych <= 0x1F) { + if (yych >= 0x0E) goto yy31; + } else { + if (yych <= ' ') goto yy109; + if (yych <= '!') goto yy31; + goto yy58; + } + } + } else { + if (yych <= '-') { + if (yych <= '#') goto yy109; + if (yych == '\'') goto yy58; + goto yy31; + } else { + if (yych <= '/') { + if (yych <= '.') goto yy107; + goto yy31; + } else { + if (yych <= '9') goto yy107; + if (yych <= ':') goto yy60; + goto yy31; + } + } } - goto yy43; -yy105: - YYDEBUG(105, *YYCURSOR); +yy109: + YYDEBUG(109, *YYCURSOR); + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 93 "sapi/phpdbg/phpdbg_lexer.l" + { + char *text = yytext + 2; + while (*++text < '0'); + yylval->num = atoi(text); + return T_REQ_ID; +} +#line 1209 "sapi/phpdbg/phpdbg_lexer.c" +yy110: + YYDEBUG(110, *YYCURSOR); yyaccept = 4; YYMARKER = ++YYCURSOR; YYFILL(3); yych = *YYCURSOR; - YYDEBUG(106, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy105; + YYDEBUG(111, *YYCURSOR); + if (yybm[0+yych] & 64) { + goto yy110; } if (yych <= ' ') { if (yych <= '\n') { - if (yych <= 0x00) goto yy107; - if (yych <= 0x08) goto yy42; + if (yych <= 0x00) goto yy112; + if (yych <= 0x08) goto yy31; } else { - if (yych == '\r') goto yy107; - if (yych <= 0x1F) goto yy42; + if (yych == '\r') goto yy112; + if (yych <= 0x1F) goto yy31; } } else { if (yych <= '&') { - if (yych <= '!') goto yy42; - if (yych <= '"') goto yy62; - if (yych >= '$') goto yy42; + if (yych <= '!') goto yy31; + if (yych <= '"') goto yy58; + if (yych >= '$') goto yy31; } else { - if (yych <= '\'') goto yy62; - if (yych <= '/') goto yy42; - if (yych <= ':') goto yy61; - goto yy42; + if (yych <= '\'') goto yy58; + if (yych <= '/') goto yy31; + if (yych <= ':') goto yy60; + goto yy31; } } -yy107: - YYDEBUG(107, *YYCURSOR); +yy112: + YYDEBUG(112, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 148 "sapi/phpdbg/phpdbg_lexer.l" { @@ -1100,396 +1245,255 @@ yy107: yylval->addr = strtoul(yytext, 0, 16); return T_ADDR; } -#line 1104 "sapi/phpdbg/phpdbg_lexer.c" -yy108: - YYDEBUG(108, *YYCURSOR); - ++YYCURSOR; - YYFILL(4); - yych = *YYCURSOR; -yy109: - YYDEBUG(109, *YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy108; - } - if (yych <= '\n') { - if (yych <= 0x00) goto yy45; - if (yych >= '\n') goto yy45; - } else { - if (yych <= '#') goto yy110; - if (yych <= '\'') goto yy118; - if (yych <= ':') goto yy112; - goto yy113; - } -yy110: - YYDEBUG(110, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; -yy111: - YYDEBUG(111, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy110; - } - if (yych <= '\n') goto yy45; - if (yych <= '\'') goto yy115; - goto yy116; -yy112: - YYDEBUG(112, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy114; - goto yy111; +#line 1249 "sapi/phpdbg/phpdbg_lexer.c" yy113: YYDEBUG(113, *YYCURSOR); ++YYCURSOR; - YYFILL(3); + YYFILL(1); yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\f') { - if (yych <= 0x00) goto yy45; - if (yych <= 0x08) goto yy62; - if (yych <= '\n') goto yy45; - goto yy62; - } else { - if (yych <= '\r') goto yy45; - if (yych == ' ') goto yy45; - goto yy62; - } - } else { - if (yych <= '9') { - if (yych <= '#') goto yy45; - if (yych == '\'') goto yy108; - goto yy62; - } else { - if (yych <= ':') goto yy64; - if (yych == '\\') goto yy108; - goto yy62; - } - } + if (yych == '\\') goto yy83; + goto yy38; yy114: YYDEBUG(114, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy117; - goto yy111; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'A') goto yy134; + if (yych == 'a') goto yy134; + goto yy32; yy115: YYDEBUG(115, *YYCURSOR); - yych = *++YYCURSOR; - goto yy39; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'B') goto yy135; + if (yych == 'b') goto yy135; + goto yy32; yy116: YYDEBUG(116, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'S') goto yy136; + if (yych == 's') goto yy136; + goto yy32; +yy117: + YYDEBUG(117, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - if (yych == '\'') goto yy110; - if (yych == '\\') goto yy110; - goto yy45; -yy117: - YYDEBUG(117, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x00) goto yy67; - if (yych == '\n') goto yy67; - goto yy111; -yy118: YYDEBUG(118, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\r') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy39; - goto yy63; - } else { - if (yych <= '\n') goto yy39; - if (yych <= '\f') goto yy63; - goto yy39; - } + if (yych <= '\f') { + if (yych == '\t') goto yy117; } else { - if (yych <= ' ') { - if (yych <= 0x1F) goto yy63; - goto yy39; - } else { - if (yych == '#') goto yy39; - goto yy63; - } + if (yych <= '\r') goto yy117; + if (yych == ' ') goto yy117; } -yy119: YYDEBUG(119, *YYCURSOR); - ++YYCURSOR; - YYFILL(4); - yych = *YYCURSOR; + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 100 "sapi/phpdbg/phpdbg_lexer.l" + { + YYSETCONDITION(RAW); + phpdbg_init_param(yylval, EMPTY_PARAM); + return T_IF; +} +#line 1298 "sapi/phpdbg/phpdbg_lexer.c" yy120: YYDEBUG(120, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy119; - } - if (yych <= ' ') { - if (yych <= 0x00) goto yy45; - if (yych == '\n') goto yy45; - } else { - if (yych <= '"') goto yy118; - if (yych <= '#') goto yy121; - if (yych <= ':') goto yy123; - goto yy124; - } -yy121: - YYDEBUG(121, *YYCURSOR); ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; + YYDEBUG(121, *YYCURSOR); + YYCURSOR = YYCTXMARKER; + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 136 "sapi/phpdbg/phpdbg_lexer.l" + { + phpdbg_init_param(yylval, NUMERIC_PARAM); + yylval->num = 0; + return T_FALSY; +} +#line 1311 "sapi/phpdbg/phpdbg_lexer.c" yy122: YYDEBUG(122, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy121; - } - if (yych <= '\n') goto yy45; - if (yych <= '"') goto yy115; - goto yy126; -yy123: + ++YYCURSOR; YYDEBUG(123, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy125; - goto yy122; + YYCURSOR = YYCTXMARKER; + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 130 "sapi/phpdbg/phpdbg_lexer.l" + { + phpdbg_init_param(yylval, NUMERIC_PARAM); + yylval->num = 1; + return T_TRUTHY; +} +#line 1324 "sapi/phpdbg/phpdbg_lexer.c" yy124: YYDEBUG(124, *YYCURSOR); - ++YYCURSOR; - YYFILL(3); - yych = *YYCURSOR; - if (yych <= ' ') { - if (yych <= '\n') { - if (yych <= 0x00) goto yy45; - if (yych <= 0x08) goto yy62; - goto yy45; - } else { - if (yych == '\r') goto yy45; - if (yych <= 0x1F) goto yy62; - goto yy45; - } - } else { - if (yych <= '9') { - if (yych <= '!') goto yy62; - if (yych <= '"') goto yy119; - if (yych <= '#') goto yy45; - goto yy62; - } else { - if (yych <= ':') goto yy64; - if (yych == '\\') goto yy119; - goto yy62; - } - } + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy91; + if (yych == 'e') goto yy91; + goto yy32; yy125: YYDEBUG(125, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '/') goto yy127; - goto yy122; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy137; + goto yy32; yy126: YYDEBUG(126, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yych == '"') goto yy121; - if (yych == '\\') goto yy121; - goto yy45; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'd') goto yy137; + goto yy32; yy127: YYDEBUG(127, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x00) goto yy67; - if (yych == '\n') goto yy67; - goto yy122; + ++YYCURSOR; yy128: YYDEBUG(128, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(129, *YYCURSOR); - YYCURSOR = YYCTXMARKER; yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 119 "sapi/phpdbg/phpdbg_lexer.l" +#line 123 "sapi/phpdbg/phpdbg_lexer.l" { - return T_COLON; + phpdbg_init_param(yylval, STR_PARAM); + yylval->str = estrndup(yytext, yyleng); + yylval->len = yyleng; + return T_PROTO; } -#line 1309 "sapi/phpdbg/phpdbg_lexer.c" +#line 1357 "sapi/phpdbg/phpdbg_lexer.c" +yy129: + YYDEBUG(129, *YYCURSOR); + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 0x00) goto yy128; + if (yych == '\n') goto yy128; + goto yy64; yy130: YYDEBUG(130, *YYCURSOR); - ++YYCURSOR; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 0x00) goto yy128; + if (yych == '\n') goto yy128; + goto yy74; +yy131: YYDEBUG(131, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 115 "sapi/phpdbg/phpdbg_lexer.l" - { - return T_DCOLON; -} -#line 1319 "sapi/phpdbg/phpdbg_lexer.c" + yych = *++YYCURSOR; + if (yych == '.') goto yy132; + if (yych <= '/') goto yy38; + if (yych >= ':') goto yy38; yy132: YYDEBUG(132, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '\f') { - if (yych != '\t') goto yy43; - } else { - if (yych <= '\r') goto yy133; - if (yych != ' ') goto yy43; - } -yy133: - YYDEBUG(133, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; + YYDEBUG(133, *YYCURSOR); + if (yych == '.') goto yy132; + if (yych <= '/') goto yy109; + if (yych <= '9') goto yy132; + goto yy109; +yy134: YYDEBUG(134, *YYCURSOR); - if (yych <= '\f') { - if (yych == '\t') goto yy133; - } else { - if (yych <= '\r') goto yy133; - if (yych == ' ') goto yy133; - } + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'B') goto yy138; + if (yych == 'b') goto yy138; + goto yy32; +yy135: YYDEBUG(135, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 100 "sapi/phpdbg/phpdbg_lexer.l" - { - YYSETCONDITION(RAW); - phpdbg_init_param(yylval, EMPTY_PARAM); - return T_IF; -} -#line 1350 "sapi/phpdbg/phpdbg_lexer.c" + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'L') goto yy139; + if (yych == 'l') goto yy139; + goto yy32; yy136: YYDEBUG(136, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych <= '\f') { - if (yych != '\t') goto yy43; - } else { - if (yych <= '\r') goto yy137; - if (yych <= 0x1F) goto yy43; - } - } else { - if (yych <= '.') { - if (yych <= ',') goto yy43; - if (yych <= '-') goto yy139; - goto yy140; - } else { - if (yych <= '/') goto yy43; - if (yych <= '9') goto yy140; - goto yy43; - } - } + if (yych == 'E') goto yy89; + if (yych == 'e') goto yy89; + goto yy32; yy137: YYDEBUG(137, *YYCURSOR); - ++YYCURSOR; - YYFILL(2); - yych = *YYCURSOR; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '_') goto yy140; + goto yy32; +yy138: YYDEBUG(138, *YYCURSOR); - if (yych <= ' ') { - if (yych <= '\f') { - if (yych == '\t') goto yy137; - goto yy45; - } else { - if (yych <= '\r') goto yy137; - if (yych <= 0x1F) goto yy45; - goto yy137; - } - } else { - if (yych <= '.') { - if (yych <= ',') goto yy45; - if (yych <= '-') goto yy143; - goto yy144; - } else { - if (yych <= '/') goto yy45; - if (yych <= '9') goto yy144; - goto yy45; - } - } + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'L') goto yy141; + if (yych == 'l') goto yy141; + goto yy32; yy139: YYDEBUG(139, *YYCURSOR); - yyaccept = 1; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy140; - if (yych <= '/') goto yy43; - if (yych >= ':') goto yy43; + if (yych == 'E') goto yy142; + if (yych == 'e') goto yy142; + goto yy32; yy140: YYDEBUG(140, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[0+yych] & 128) { + goto yy143; + } + goto yy32; +yy141: + YYDEBUG(141, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy146; + if (yych == 'e') goto yy146; + goto yy32; +yy142: + YYDEBUG(142, *YYCURSOR); + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy91; + if (yych == 'd') goto yy91; + goto yy32; +yy143: + YYDEBUG(143, *YYCURSOR); yyaccept = 6; YYMARKER = ++YYCURSOR; YYFILL(3); yych = *YYCURSOR; - YYDEBUG(141, *YYCURSOR); - if (yych <= '"') { - if (yych <= '\f') { - if (yych <= 0x00) goto yy142; - if (yych <= 0x08) goto yy42; - if (yych >= '\v') goto yy42; + YYDEBUG(144, *YYCURSOR); + if (yybm[0+yych] & 128) { + goto yy143; + } + if (yych <= ' ') { + if (yych <= '\n') { + if (yych <= 0x00) goto yy145; + if (yych <= 0x08) goto yy31; } else { - if (yych <= 0x1F) { - if (yych >= 0x0E) goto yy42; - } else { - if (yych <= ' ') goto yy142; - if (yych <= '!') goto yy42; - goto yy62; - } + if (yych == '\r') goto yy145; + if (yych <= 0x1F) goto yy31; } } else { - if (yych <= '-') { - if (yych <= '#') goto yy142; - if (yych == '\'') goto yy62; - goto yy42; + if (yych <= '&') { + if (yych <= '!') goto yy31; + if (yych <= '"') goto yy58; + if (yych >= '$') goto yy31; } else { - if (yych <= '/') { - if (yych <= '.') goto yy140; - goto yy42; - } else { - if (yych <= '9') goto yy140; - if (yych <= ':') goto yy61; - goto yy42; - } + if (yych <= '\'') goto yy58; + if (yych == ':') goto yy60; + goto yy31; } } -yy142: - YYDEBUG(142, *YYCURSOR); +yy145: + YYDEBUG(145, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 93 "sapi/phpdbg/phpdbg_lexer.l" +#line 154 "sapi/phpdbg/phpdbg_lexer.l" { - char *text = yytext + 2; - while (*++text < '0'); - yylval->num = atoi(text); - return T_REQ_ID; + phpdbg_init_param(yylval, OP_PARAM); + yylval->str = estrndup(yytext, yyleng); + yylval->len = yyleng; + return T_OPCODE; } -#line 1453 "sapi/phpdbg/phpdbg_lexer.c" -yy143: - YYDEBUG(143, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy144; - if (yych <= '/') goto yy45; - if (yych >= ':') goto yy45; -yy144: - YYDEBUG(144, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(145, *YYCURSOR); - if (yych == '.') goto yy144; - if (yych <= '/') goto yy142; - if (yych <= '9') goto yy144; - goto yy142; +#line 1490 "sapi/phpdbg/phpdbg_lexer.c" yy146: YYDEBUG(146, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy147; - if (yych <= '/') goto yy45; - if (yych >= ':') goto yy45; -yy147: - YYDEBUG(147, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(148, *YYCURSOR); - if (yych == '.') goto yy147; - if (yych <= '/') goto yy149; - if (yych <= '9') goto yy147; -yy149: - YYDEBUG(149, *YYCURSOR); - YYCURSOR = YYCTXMARKER; - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 106 "sapi/phpdbg/phpdbg_lexer.l" - { - return T_POUND; -} -#line 1493 "sapi/phpdbg/phpdbg_lexer.c" + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy89; + if (yych == 'd') goto yy89; + goto yy32; } /* *********************************** */ yyc_PRE_RAW: @@ -1528,34 +1532,23 @@ yyc_PRE_RAW: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - YYDEBUG(150, *YYCURSOR); + YYDEBUG(147, *YYCURSOR); YYFILL(2); yych = *YYCURSOR; if (yych <= '\r') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy158; - if (yych <= 0x08) goto yy160; - } else { - if (yych <= '\n') goto yy158; - if (yych <= '\f') goto yy160; - } + if (yych == '\t') goto yy151; + if (yych >= '\r') goto yy151; } else { - if (yych <= '"') { - if (yych == ' ') goto yy154; - goto yy160; + if (yych <= ' ') { + if (yych >= ' ') goto yy152; } else { - if (yych <= '#') goto yy157; - if (yych == '-') goto yy159; - goto yy160; + if (yych == '-') goto yy155; } } - YYDEBUG(152, *YYCURSOR); + YYDEBUG(149, *YYCURSOR); ++YYCURSOR; - if (yybm[0+(yych = *YYCURSOR)] & 64) { - goto yy154; - } -yy153: - YYDEBUG(153, *YYCURSOR); +yy150: + YYDEBUG(150, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 199 "sapi/phpdbg/phpdbg_lexer.l" { @@ -1564,17 +1557,24 @@ yy153: YYCURSOR = LEX(text); goto restart; } -#line 1568 "sapi/phpdbg/phpdbg_lexer.c" -yy154: - YYDEBUG(154, *YYCURSOR); +#line 1561 "sapi/phpdbg/phpdbg_lexer.c" +yy151: + YYDEBUG(151, *YYCURSOR); + yych = *++YYCURSOR; + if (yybm[0+yych] & 64) { + goto yy152; + } + goto yy150; +yy152: + YYDEBUG(152, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(155, *YYCURSOR); + YYDEBUG(153, *YYCURSOR); if (yybm[0+yych] & 64) { - goto yy154; + goto yy152; } - YYDEBUG(156, *YYCURSOR); + YYDEBUG(154, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 175 "sapi/phpdbg/phpdbg_lexer.l" { @@ -1583,64 +1583,50 @@ yy154: goto restart; } #line 1586 "sapi/phpdbg/phpdbg_lexer.c" -yy157: - YYDEBUG(157, *YYCURSOR); - yych = *++YYCURSOR; - goto yy153; -yy158: - YYDEBUG(158, *YYCURSOR); - yych = *++YYCURSOR; - goto yy153; -yy159: - YYDEBUG(159, *YYCURSOR); - yyaccept = 0; +yy155: + YYDEBUG(155, *YYCURSOR); yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'r') goto yy161; - goto yy153; -yy160: - YYDEBUG(160, *YYCURSOR); - yych = *++YYCURSOR; - goto yy153; -yy161: - YYDEBUG(161, *YYCURSOR); + if (yych != 'r') goto yy150; +yy156: + YYDEBUG(156, *YYCURSOR); ++YYCURSOR; YYFILL(2); yych = *YYCURSOR; - YYDEBUG(162, *YYCURSOR); + YYDEBUG(157, *YYCURSOR); if (yybm[0+yych] & 128) { - goto yy165; + goto yy160; } if (yych <= '\r') { - if (yych == '\t') goto yy161; - if (yych >= '\r') goto yy161; + if (yych == '\t') goto yy156; + if (yych >= '\r') goto yy156; } else { if (yych <= ' ') { - if (yych >= ' ') goto yy161; + if (yych >= ' ') goto yy156; } else { - if (yych == '-') goto yy164; + if (yych == '-') goto yy159; } } -yy163: - YYDEBUG(163, *YYCURSOR); +yy158: + YYDEBUG(158, *YYCURSOR); YYCURSOR = YYMARKER; - goto yy153; -yy164: - YYDEBUG(164, *YYCURSOR); + goto yy150; +yy159: + YYDEBUG(159, *YYCURSOR); yych = *++YYCURSOR; if (yybm[0+yych] & 128) { - goto yy165; + goto yy160; } - goto yy163; -yy165: - YYDEBUG(165, *YYCURSOR); + goto yy158; +yy160: + YYDEBUG(160, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(166, *YYCURSOR); + YYDEBUG(161, *YYCURSOR); if (yybm[0+yych] & 128) { - goto yy165; + goto yy160; } - YYDEBUG(167, *YYCURSOR); + YYDEBUG(162, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 93 "sapi/phpdbg/phpdbg_lexer.l" { @@ -1649,17 +1635,17 @@ yy165: yylval->num = atoi(text); return T_REQ_ID; } -#line 1653 "sapi/phpdbg/phpdbg_lexer.c" +#line 1639 "sapi/phpdbg/phpdbg_lexer.c" } /* *********************************** */ yyc_RAW: { static const unsigned char yybm[] = { 0, 232, 232, 232, 232, 232, 232, 232, - 232, 236, 0, 232, 232, 236, 232, 232, + 232, 232, 0, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 236, 232, 32, 224, 232, 232, 232, 128, + 232, 232, 64, 224, 232, 232, 232, 32, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, @@ -1688,61 +1674,43 @@ yyc_RAW: 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, }; - YYDEBUG(168, *YYCURSOR); + YYDEBUG(163, *YYCURSOR); YYFILL(1); yych = *YYCURSOR; - if (yybm[0+yych] & 4) { - goto yy170; - } - if (yych <= '"') { - if (yych <= 0x08) { - if (yych <= 0x00) goto yy175; - goto yy177; - } else { - if (yych <= '\n') goto yy175; - if (yych <= '!') goto yy177; - goto yy181; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy173; - if (yych <= '&') goto yy177; - goto yy183; - } else { - if (yych == '\\') goto yy179; - goto yy177; - } + if (yybm[0+yych] & 8) { + goto yy167; } -yy170: - YYDEBUG(170, *YYCURSOR); - yyaccept = 0; + if (yych <= '\n') goto yy165; + if (yych <= '"') goto yy170; + if (yych <= '#') goto yy172; + if (yych <= '\'') goto yy174; + goto yy175; +yy165: + YYDEBUG(165, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(166, *YYCURSOR); + yyleng = (size_t) YYCURSOR - (size_t) yytext; +#line 89 "sapi/phpdbg/phpdbg_lexer.l" + { + return 0; +} +#line 1698 "sapi/phpdbg/phpdbg_lexer.c" +yy167: + YYDEBUG(167, *YYCURSOR); YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(171, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy170; - } - if (yych <= '"') { - if (yych <= 0x08) { - if (yych >= 0x01) goto yy177; - } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy177; - goto yy181; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy172; - if (yych <= '&') goto yy177; - goto yy183; - } else { - if (yych == '\\') goto yy179; - goto yy177; - } - } -yy172: - YYDEBUG(172, *YYCURSOR); + YYDEBUG(168, *YYCURSOR); + if (yybm[0+yych] & 8) { + goto yy167; + } + if (yych <= '\n') goto yy169; + if (yych <= '"') goto yy170; + if (yych <= '#') goto yy169; + if (yych <= '\'') goto yy174; + goto yy175; +yy169: + YYDEBUG(169, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 168 "sapi/phpdbg/phpdbg_lexer.l" { @@ -1751,390 +1719,361 @@ yy172: yylval->len = yyleng; return T_INPUT; } -#line 1755 "sapi/phpdbg/phpdbg_lexer.c" -yy173: - YYDEBUG(173, *YYCURSOR); +#line 1723 "sapi/phpdbg/phpdbg_lexer.c" +yy170: + YYDEBUG(170, *YYCURSOR); ++YYCURSOR; - YYDEBUG(174, *YYCURSOR); + YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy177; + } + if (yych >= '#') goto yy179; +yy171: + YYDEBUG(171, *YYCURSOR); + YYCURSOR = YYMARKER; + goto yy169; +yy172: + YYDEBUG(172, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(173, *YYCURSOR); yyleng = (size_t) YYCURSOR - (size_t) yytext; #line 110 "sapi/phpdbg/phpdbg_lexer.l" { YYSETCONDITION(INITIAL); return T_SEPARATOR; } -#line 1766 "sapi/phpdbg/phpdbg_lexer.c" +#line 1747 "sapi/phpdbg/phpdbg_lexer.c" +yy174: + YYDEBUG(174, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 64) { + goto yy181; + } + if (yych <= '\'') goto yy171; + goto yy183; yy175: YYDEBUG(175, *YYCURSOR); ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; YYDEBUG(176, *YYCURSOR); - yyleng = (size_t) YYCURSOR - (size_t) yytext; -#line 89 "sapi/phpdbg/phpdbg_lexer.l" - { - return 0; -} -#line 1776 "sapi/phpdbg/phpdbg_lexer.c" + if (yybm[0+yych] & 16) { + goto yy175; + } + if (yych <= '!') { + if (yych <= 0x00) goto yy169; + if (yych == '\n') goto yy169; + goto yy167; + } else { + if (yych <= '"') goto yy185; + if (yych == '\'') goto yy186; + goto yy167; + } yy177: YYDEBUG(177, *YYCURSOR); - yyaccept = 0; - YYMARKER = ++YYCURSOR; + ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; YYDEBUG(178, *YYCURSOR); - if (yybm[0+yych] & 8) { + if (yybm[0+yych] & 32) { goto yy177; } - if (yych <= '\n') goto yy172; - if (yych <= '"') goto yy181; - if (yych <= '#') goto yy172; - if (yych <= '\'') goto yy183; + if (yych <= '\n') goto yy171; + if (yych <= '"') goto yy167; yy179: YYDEBUG(179, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; YYDEBUG(180, *YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy179; - } - if (yych <= '!') { - if (yych <= 0x00) goto yy172; - if (yych == '\n') goto yy172; - goto yy177; - } else { - if (yych <= '"') goto yy211; - if (yych == '\'') goto yy193; + if (yybm[0+yych] & 32) { goto yy177; } + if (yych <= '\n') goto yy171; + if (yych <= '"') goto yy187; + goto yy179; yy181: YYDEBUG(181, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy207; - } - if (yych >= '#') goto yy209; -yy182: YYDEBUG(182, *YYCURSOR); - YYCURSOR = YYMARKER; - goto yy172; + if (yybm[0+yych] & 64) { + goto yy181; + } + if (yych <= '\n') goto yy171; + if (yych <= '\'') goto yy167; yy183: YYDEBUG(183, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - if (yybm[0+yych] & 32) { - goto yy184; - } - if (yych <= '\'') goto yy182; - goto yy186; -yy184: YYDEBUG(184, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(185, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy184; - } - if (yych <= '\n') goto yy182; - if (yych <= '\'') goto yy177; -yy186: - YYDEBUG(186, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(187, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy184; + if (yybm[0+yych] & 64) { + goto yy181; } - if (yych <= '\n') goto yy182; - if (yych >= '(') goto yy186; -yy188: - YYDEBUG(188, *YYCURSOR); - yyaccept = 0; + if (yych <= '\n') goto yy171; + if (yych <= '\'') goto yy189; + goto yy183; +yy185: + YYDEBUG(185, *YYCURSOR); YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(189, *YYCURSOR); if (yych <= '"') { if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy188; + if (yych <= 0x00) goto yy169; + goto yy187; } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy188; - goto yy192; + if (yych <= '\n') goto yy169; + if (yych <= '!') goto yy187; + goto yy170; } } else { if (yych <= '\'') { - if (yych <= '#') goto yy184; - if (yych <= '&') goto yy188; - goto yy193; + if (yych <= '#') goto yy177; + if (yych <= '&') goto yy187; + goto yy191; } else { - if (yych != '\\') goto yy188; + if (yych == '\\') goto yy192; + goto yy187; } } -yy190: - YYDEBUG(190, *YYCURSOR); - ++YYCURSOR; +yy186: + YYDEBUG(186, *YYCURSOR); + YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(191, *YYCURSOR); - if (yych <= '!') { - if (yych <= 0x00) goto yy172; - if (yych == '\n') goto yy172; - goto yy188; + if (yych <= '"') { + if (yych <= '\t') { + if (yych <= 0x00) goto yy169; + goto yy189; + } else { + if (yych <= '\n') goto yy169; + if (yych <= '!') goto yy189; + goto yy194; + } } else { - if (yych <= '"') goto yy203; - if (yych == '\\') goto yy190; - goto yy188; - } -yy192: - YYDEBUG(192, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy196; + if (yych <= '\'') { + if (yych <= '#') goto yy181; + if (yych <= '&') goto yy189; + goto yy174; + } else { + if (yych == '\\') goto yy195; + goto yy189; + } } - if (yych <= '\n') goto yy182; - if (yych <= '"') goto yy184; - if (yych <= '\'') goto yy194; - goto yy198; -yy193: - YYDEBUG(193, *YYCURSOR); - yyaccept = 0; +yy187: + YYDEBUG(187, *YYCURSOR); YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; + YYDEBUG(188, *YYCURSOR); if (yych <= '"') { if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy188; + if (yych <= 0x00) goto yy169; + goto yy187; } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy188; - goto yy192; + if (yych <= '\n') goto yy169; + if (yych <= '!') goto yy187; + goto yy185; } } else { if (yych <= '\'') { - if (yych <= '#') goto yy184; - if (yych <= '&') goto yy188; - goto yy183; + if (yych <= '#') goto yy177; + if (yych <= '&') goto yy187; + goto yy191; } else { - if (yych == '\\') goto yy190; - goto yy188; + if (yych == '\\') goto yy192; + goto yy187; } } -yy194: - YYDEBUG(194, *YYCURSOR); - yyaccept = 0; +yy189: + YYDEBUG(189, *YYCURSOR); YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(195, *YYCURSOR); + YYDEBUG(190, *YYCURSOR); if (yych <= '"') { if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy194; + if (yych <= 0x00) goto yy169; + goto yy189; } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy194; - goto yy211; + if (yych <= '\n') goto yy169; + if (yych <= '!') goto yy189; + goto yy194; } } else { if (yych <= '\'') { - if (yych <= '#') goto yy207; - if (yych <= '&') goto yy194; - goto yy206; + if (yych <= '#') goto yy181; + if (yych <= '&') goto yy189; + goto yy186; } else { - if (yych == '\\') goto yy212; - goto yy194; + if (yych == '\\') goto yy195; + goto yy189; } } -yy196: - YYDEBUG(196, *YYCURSOR); +yy191: + YYDEBUG(191, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(197, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy196; + if (yybm[0+yych] & 128) { + goto yy197; } - if (yych <= '\n') goto yy182; - if (yych <= '"') goto yy188; - if (yych <= '\'') goto yy194; -yy198: - YYDEBUG(198, *YYCURSOR); + if (yych <= '\n') goto yy171; + if (yych <= '"') goto yy189; + if (yych <= '\'') goto yy177; + goto yy199; +yy192: + YYDEBUG(192, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(199, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy196; + YYDEBUG(193, *YYCURSOR); + if (yych <= '&') { + if (yych <= 0x00) goto yy169; + if (yych == '\n') goto yy169; + goto yy187; + } else { + if (yych <= '\'') goto yy201; + if (yych == '\\') goto yy192; + goto yy187; + } +yy194: + YYDEBUG(194, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy197; } - if (yych <= '\n') goto yy182; - if (yych >= '(') goto yy198; -yy200: + if (yych <= '\n') goto yy171; + if (yych <= '"') goto yy181; + if (yych <= '\'') goto yy187; + goto yy199; +yy195: + YYDEBUG(195, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; + YYDEBUG(196, *YYCURSOR); + if (yych <= '!') { + if (yych <= 0x00) goto yy169; + if (yych == '\n') goto yy169; + goto yy189; + } else { + if (yych <= '"') goto yy202; + if (yych == '\\') goto yy195; + goto yy189; + } +yy197: + YYDEBUG(197, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; + YYDEBUG(198, *YYCURSOR); + if (yybm[0+yych] & 128) { + goto yy197; + } + if (yych <= '\n') goto yy171; + if (yych <= '"') goto yy189; + if (yych <= '\'') goto yy187; +yy199: + YYDEBUG(199, *YYCURSOR); + ++YYCURSOR; + YYFILL(1); + yych = *YYCURSOR; YYDEBUG(200, *YYCURSOR); - yyaccept = 0; + if (yybm[0+yych] & 128) { + goto yy197; + } + if (yych <= '\n') goto yy171; + if (yych <= '\'') goto yy203; + goto yy199; +yy201: + YYDEBUG(201, *YYCURSOR); YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(201, *YYCURSOR); if (yych <= '"') { if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy200; - } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy200; + if (yych <= 0x00) goto yy169; goto yy203; + } else { + if (yych <= '\n') goto yy169; + if (yych <= '!') goto yy203; } } else { if (yych <= '\'') { - if (yych <= '#') goto yy196; - if (yych <= '&') goto yy200; + if (yych <= '#') goto yy197; + if (yych <= '&') goto yy203; + goto yy191; } else { - if (yych == '\\') goto yy204; - goto yy200; + if (yych == '\\') goto yy205; + goto yy203; } } yy202: YYDEBUG(202, *YYCURSOR); - yyaccept = 0; YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; if (yych <= '"') { if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy200; + if (yych <= 0x00) goto yy169; } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy200; + if (yych <= '\n') goto yy169; + if (yych >= '"') goto yy194; } } else { if (yych <= '\'') { - if (yych <= '#') goto yy196; - if (yych <= '&') goto yy200; - goto yy206; + if (yych <= '#') goto yy197; + if (yych >= '\'') goto yy201; } else { - if (yych == '\\') goto yy204; - goto yy200; + if (yych == '\\') goto yy205; } } yy203: YYDEBUG(203, *YYCURSOR); - yyaccept = 0; YYMARKER = ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - if (yych <= '"') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy200; - } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy200; - goto yy192; - } - } else { - if (yych <= '\'') { - if (yych <= '#') goto yy196; - if (yych <= '&') goto yy200; - goto yy202; - } else { - if (yych != '\\') goto yy200; - } - } -yy204: YYDEBUG(204, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(205, *YYCURSOR); - if (yych <= '\n') { - if (yych <= 0x00) goto yy172; - if (yych <= '\t') goto yy200; - goto yy172; - } else { - if (yych == '\\') goto yy204; - goto yy200; - } -yy206: - YYDEBUG(206, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy196; - } - if (yych <= '\n') goto yy182; - if (yych <= '"') goto yy188; - if (yych >= '(') goto yy198; -yy207: - YYDEBUG(207, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(208, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy207; - } - if (yych <= '\n') goto yy182; - if (yych <= '"') goto yy177; -yy209: - YYDEBUG(209, *YYCURSOR); - ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(210, *YYCURSOR); - if (yybm[0+yych] & 128) { - goto yy207; - } - if (yych <= '\n') goto yy182; - if (yych <= '"') goto yy194; - goto yy209; -yy211: - YYDEBUG(211, *YYCURSOR); - yyaccept = 0; - YYMARKER = ++YYCURSOR; - YYFILL(1); - yych = *YYCURSOR; if (yych <= '"') { if (yych <= '\t') { - if (yych <= 0x00) goto yy172; - goto yy194; + if (yych <= 0x00) goto yy169; + goto yy203; } else { - if (yych <= '\n') goto yy172; - if (yych <= '!') goto yy194; - goto yy181; + if (yych <= '\n') goto yy169; + if (yych <= '!') goto yy203; + goto yy202; } } else { if (yych <= '\'') { - if (yych <= '#') goto yy207; - if (yych <= '&') goto yy194; - goto yy206; + if (yych <= '#') goto yy197; + if (yych <= '&') goto yy203; + goto yy201; } else { - if (yych != '\\') goto yy194; + if (yych != '\\') goto yy203; } } -yy212: - YYDEBUG(212, *YYCURSOR); +yy205: + YYDEBUG(205, *YYCURSOR); ++YYCURSOR; YYFILL(1); yych = *YYCURSOR; - YYDEBUG(213, *YYCURSOR); - if (yych <= '&') { - if (yych <= 0x00) goto yy172; - if (yych == '\n') goto yy172; - goto yy194; + YYDEBUG(206, *YYCURSOR); + if (yych <= '\n') { + if (yych <= 0x00) goto yy169; + if (yych <= '\t') goto yy203; + goto yy169; } else { - if (yych <= '\'') goto yy202; - if (yych == '\\') goto yy212; - goto yy194; + if (yych == '\\') goto yy205; + goto yy203; } } } diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index cd778562af..c3297244d0 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -129,9 +129,9 @@ PHPDBG_LIST(class) /* {{{ */ return SUCCESS; } /* }}} */ -void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highlight) /* {{{ */ +void phpdbg_list_file(zend_string *filename, uint32_t count, int offset, uint32_t highlight) /* {{{ */ { - uint line, lastline; + uint32_t line, lastline; phpdbg_file_source *data; if (!(data = zend_hash_find_ptr(&PHPDBG_G(file_sources), filename))) { @@ -153,8 +153,8 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli phpdbg_xml("<list %r file=\"%s\">", ZSTR_VAL(filename)); for (line = offset; line < lastline;) { - uint linestart = data->line[line++]; - uint linelen = data->line[line] - linestart; + uint32_t linestart = data->line[line++]; + uint32_t linelen = data->line[line] - linestart; char *buffer = data->buf + linestart; if (!highlight) { @@ -237,7 +237,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { zend_file_handle fake; zend_op_array *ret; char *filename; - uint line; + uint32_t line; char *bufptr, *endptr; if (zend_stream_fixup(file, &bufptr, &data.len) == FAILURE) { @@ -261,11 +261,11 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { fake.filename = filename; fake.opened_path = file->opened_path; - *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data; + *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * data.len)) = data; for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) { if (*bufptr == '\n') { - dataptr->line[++line] = (uint)(bufptr - data.buf) + 1; + dataptr->line[++line] = (uint32_t)(bufptr - data.buf) + 1; } } dataptr->lines = ++line; @@ -283,7 +283,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { return NULL; } - dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); + dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line); zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr); phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename)); @@ -335,20 +335,20 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) { zend_string *fake_name; zend_op_array *op_array; phpdbg_file_source *dataptr; - uint line; + uint32_t line; char *bufptr, *endptr; if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) { return PHPDBG_G(compile_string)(source_string, filename); } - dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * Z_STRLEN_P(source_string)); + dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * Z_STRLEN_P(source_string)); dataptr->buf = estrndup(Z_STRVAL_P(source_string), Z_STRLEN_P(source_string)); dataptr->len = Z_STRLEN_P(source_string); dataptr->line[0] = 0; for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;) { if (*bufptr == '\n') { - dataptr->line[++line] = (uint)(bufptr - dataptr->buf) + 1; + dataptr->line[++line] = (uint32_t)(bufptr - dataptr->buf) + 1; } } dataptr->lines = ++line; @@ -364,7 +364,7 @@ zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) { fake_name = strpprintf(0, "%s%c%p", filename, 0, op_array->opcodes); - dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); + dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line); zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr); zend_string_release(fake_name); diff --git a/sapi/phpdbg/phpdbg_list.h b/sapi/phpdbg/phpdbg_list.h index aaca41aeaa..53479e6b61 100644 --- a/sapi/phpdbg/phpdbg_list.h +++ b/sapi/phpdbg/phpdbg_list.h @@ -34,7 +34,7 @@ PHPDBG_LIST(func); void phpdbg_list_function_byname(const char *, size_t); void phpdbg_list_function(const zend_function *); -void phpdbg_list_file(zend_string *, uint, int, uint); +void phpdbg_list_file(zend_string *, uint32_t, int, uint32_t); extern const phpdbg_command_t phpdbg_list_commands[]; @@ -48,8 +48,8 @@ typedef struct { void *map; #endif zend_op_array op_array; - uint lines; - uint line[1]; + uint32_t lines; + uint32_t line[1]; } phpdbg_file_source; #endif /* PHPDBG_LIST_H */ diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index 368784cfd4..62f5e8c71c 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -99,6 +99,11 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *opline) /*{{{ */ uint32_t flags = zend_get_opcode_flags(opline->opcode); char *result, *decode[4] = {NULL, NULL, NULL, NULL}; + /* OpcodeName */ + if (opline->extended_value) { + spprintf(&decode[0], 0, "%s<%" PRIi32 ">", opcode_name, opline->extended_value); + } + /* OP1 */ decode[1] = phpdbg_decode_input_op( ops, opline, opline->op1, opline->op1_type, ZEND_VM_OP1_FLAGS(flags)); diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c index 6959077d47..0eead04495 100644 --- a/sapi/phpdbg/phpdbg_out.c +++ b/sapi/phpdbg/phpdbg_out.c @@ -861,11 +861,10 @@ PHPDBG_API int phpdbg_xml_vasprintf(char **buf, const char *format, zend_bool es *buf = NULL; if (cc >= 0) { - if ((*buf = emalloc(++cc)) != NULL) { - if ((cc = phpdbg_xml_vsnprintf(*buf, cc, format, escape_xml, ap)) < 0) { - efree(*buf); - *buf = NULL; - } + *buf = emalloc(++cc); + if ((cc = phpdbg_xml_vsnprintf(*buf, cc, format, escape_xml, ap)) < 0) { + efree(*buf); + *buf = NULL; } } diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 77954a96d7..88b0dad0b0 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -46,7 +46,7 @@ #include "phpdbg_wait.h" #include "phpdbg_eol.h" -#if ZEND_VM_KIND != ZEND_VM_KIND_CALL +#if ZEND_VM_KIND != ZEND_VM_KIND_CALL && ZEND_VM_KIND != ZEND_VM_KIND_HYBRID #error "phpdbg can only be built with CALL zend vm kind" #endif @@ -58,9 +58,6 @@ extern int phpdbg_startup_run; #include "win32/param.h" #include "win32/winutil.h" #define GET_DL_ERROR() php_win_err() -#elif defined(NETWARE) -#include <sys/param.h> -#define GET_DL_ERROR() dlerror() #else #include <sys/param.h> #define GET_DL_ERROR() DL_ERROR() @@ -528,7 +525,7 @@ int phpdbg_compile_stdin(zend_string *code) { ZVAL_STR(&zv, code); - PHPDBG_G(ops) = zend_compile_string(&zv, "-"); + PHPDBG_G(ops) = zend_compile_string(&zv, "Standard input code"); zend_string_release(code); @@ -539,18 +536,18 @@ int phpdbg_compile_stdin(zend_string *code) { if (PHPDBG_G(exec)) { efree(PHPDBG_G(exec)); } - PHPDBG_G(exec) = estrdup("-"); - PHPDBG_G(exec_len) = 1; + PHPDBG_G(exec) = estrdup("Standard input code"); + PHPDBG_G(exec_len) = sizeof("Standard input code") - 1; { /* remove leading ?> from source */ int i; /* remove trailing data after zero byte, used for avoiding conflicts in eval()'ed code snippets */ - zend_string *source_path = strpprintf(0, "-%c%p", 0, PHPDBG_G(ops)->opcodes); + zend_string *source_path = strpprintf(0, "Standard input code%c%p", 0, PHPDBG_G(ops)->opcodes); phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), source_path); dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor; PHPDBG_G(file_sources).pDestructor = NULL; zend_hash_del(&PHPDBG_G(file_sources), source_path); PHPDBG_G(file_sources).pDestructor = dtor; - zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "-", 1, data); + zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "Standard input code", sizeof("Standard input code")-1, data); zend_string_release(source_path); for (i = 1; i <= data->lines; i++) { @@ -560,7 +557,7 @@ int phpdbg_compile_stdin(zend_string *code) { memmove(data->buf, data->buf + 2, data->len); } - phpdbg_notice("compile", "context=\"-\"", "Successful compilation of stdin input"); + phpdbg_notice("compile", "context=\"Standard input code\"", "Successful compilation of stdin input"); return SUCCESS; } @@ -611,8 +608,8 @@ int phpdbg_compile(void) /* {{{ */ zend_hash_del(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); PHPDBG_G(file_sources).pDestructor = dtor; - data = erealloc(data, sizeof(phpdbg_file_source) + sizeof(uint) * ++data->lines); - memmove(data->line + 1, data->line, sizeof(uint) * data->lines); + data = erealloc(data, sizeof(phpdbg_file_source) + sizeof(uint32_t) * ++data->lines); + memmove(data->line + 1, data->line, sizeof(uint32_t) * data->lines); data->line[0] = 0; data->buf = erealloc(data->buf, data->len + start_line_len); memmove(data->buf + start_line_len, data->buf, data->len); @@ -1208,7 +1205,7 @@ PHPDBG_COMMAND(break) /* {{{ */ { if (!param) { if (PHPDBG_G(exec)) { - phpdbg_set_breakpoint_file_ex( + phpdbg_set_breakpoint_file( zend_get_executed_filename(), strlen(zend_get_executed_filename()), zend_get_executed_lineno()); @@ -1221,7 +1218,7 @@ PHPDBG_COMMAND(break) /* {{{ */ break; case NUMERIC_PARAM: if (PHPDBG_G(exec)) { - phpdbg_set_breakpoint_file_ex(phpdbg_current_file(), strlen(phpdbg_current_file()), param->num); + phpdbg_set_breakpoint_file(phpdbg_current_file(), strlen(phpdbg_current_file()), param->num); } else { phpdbg_error("inactive", "type=\"noexec\"", "Execution context not set!"); } @@ -1236,7 +1233,7 @@ PHPDBG_COMMAND(break) /* {{{ */ phpdbg_set_breakpoint_function_opline(param->str, param->num); break; case FILE_PARAM: - phpdbg_set_breakpoint_file(param->file.name, param->file.line); + phpdbg_set_breakpoint_file(param->file.name, 0, param->file.line); break; case NUMERIC_FILE_PARAM: phpdbg_set_breakpoint_file_opline(param->file.name, param->file.line); diff --git a/sapi/phpdbg/tests/exceptions_003.phpt b/sapi/phpdbg/tests/exceptions_003.phpt index 51090c081a..1ffcf4246c 100644 --- a/sapi/phpdbg/tests/exceptions_003.phpt +++ b/sapi/phpdbg/tests/exceptions_003.phpt @@ -20,22 +20,22 @@ prompt> [L0 %s HANDLE_EXCEPTION >00005: x(); 00006: } finally { 00007: print "ok\n"; -prompt> [L7 %s ECHO "ok\n" %s] +prompt> [L7 %s ECHO<1> "ok\n" %s] >00007: print "ok\n"; 00008: } 00009: } catch (Error $e) { prompt> ok [L7 %s FAST_RET ~%d try-catch(0) %s] -[L9 %s CATCH "Error" $e 1 %s] +[L9 %s CATCH<-224> "Error" $e 1 %s] >00005: x(); 00006: } finally { 00007: print "ok\n"; -prompt> [L10 %s ECHO "caught\n" %s] +prompt> [L10 %s ECHO<1> "caught\n" %s] >00010: print "caught\n"; 00011: } 00012: prompt> caught -[L14 %s RETURN 1 %s] +[L14 %s RETURN<-1> 1 %s] >00014: prompt> --FILE-- diff --git a/sapi/phpdbg/tests/next_001.phpt b/sapi/phpdbg/tests/next_001.phpt index b07d954303..afc5133d25 100644 --- a/sapi/phpdbg/tests/next_001.phpt +++ b/sapi/phpdbg/tests/next_001.phpt @@ -15,7 +15,7 @@ prompt> [Breakpoint #0 at %s:4, hits: 1] 00005: } 00006: prompt> 0 -[L5 %s RETURN null %s] +[L5 %s RETURN<-1> null %s] >00005: } 00006: 00007: foo(); @@ -23,7 +23,7 @@ prompt> [L8 %s ECHO 1 >00008: echo 1; 00009: prompt> 1 -[L9 %s RETURN 1 %s] +[L9 %s RETURN<-1> 1 %s] >00009: prompt> --FILE-- diff --git a/sapi/phpdbg/tests/print_001.phpt b/sapi/phpdbg/tests/print_001.phpt index 94ccedc3cf..93a000528f 100644 --- a/sapi/phpdbg/tests/print_001.phpt +++ b/sapi/phpdbg/tests/print_001.phpt @@ -19,16 +19,16 @@ L14-16 foo() %s - %s + 8 ops L15 #4 DO_%cCALL @0 L15 #5 SEND_VAR @0 1 L15 #6 DO_%cCALL - L16 #7 RETURN null + L16 #7 RETURN<-1> null prompt> [User Class: Foo\Bar (2 methods)] L5-7 Foo\Bar::Foo() %s - %s + 5 ops L5 #0 RECV 1 $bar - L6 #1 INIT_NS_FCALL_BY_NAME "Foo\\var_dump" + L6 #1 INIT_NS_FCALL_BY_NAME<1> "Foo\\var_dump" L6 #2 SEND_VAR_EX $bar 1 L6 #3 DO_FCALL - L7 #4 RETURN null + L7 #4 RETURN<-1> null L9-9 Foo\Bar::baz() %s - %s + 1 ops - L9 #0 RETURN null + L9 #0 RETURN<-1> null prompt> [Not Executing!] prompt> [Context %s (11 ops)] L1-21 {main}() %s - %s + 11 ops @@ -36,13 +36,13 @@ L1-21 {main}() %s - %s + 11 ops L14 #1 NOP L18 #2 NEW "Foo\\Bar" @1 L18 #3 DO_FCALL - L18 #4 INIT_METHOD_CALL @1 "Foo" + L18 #4 INIT_METHOD_CALL<1> @1 "Foo" L18 #5 SEND_VAL_EX "test" 1 L18 #6 DO_FCALL L19 #7 INIT_FCALL%s %d %s "foo" L19 #8 SEND_VAL "test" 1 L19 #9 DO_FCALL - L21 #10 RETURN 1 + L21 #10 RETURN<-1> 1 prompt> --FILE-- <?php diff --git a/sapi/phpdbg/tests/print_002.phpt b/sapi/phpdbg/tests/print_002.phpt index 3a824986c1..dfec641672 100644 --- a/sapi/phpdbg/tests/print_002.phpt +++ b/sapi/phpdbg/tests/print_002.phpt @@ -25,7 +25,7 @@ L14-16 foo() %s - %s + 8 ops L15 #4 DO_%cCALL @0 L15 #5 SEND_VAR @0 1 L15 #6 DO_%cCALL - L16 #7 RETURN null + L16 #7 RETURN<-1> null prompt> [L15 %s INIT_FCALL%s %d %s "var_dump" %s] prompt> --FILE-- diff --git a/sapi/phpdbg/tests/stdin_001.phpt b/sapi/phpdbg/tests/stdin_001.phpt index 0bc940caef..2f93a2d956 100644 --- a/sapi/phpdbg/tests/stdin_001.phpt +++ b/sapi/phpdbg/tests/stdin_001.phpt @@ -13,13 +13,13 @@ r q --EXPECTF-- prompt> [Successful compilation of stdin input] -prompt> [Breakpoint #0 added at -:3] -prompt> [Breakpoint #0 at -:3, hits: 1] +prompt> [Breakpoint #0 added at Standard input code:3] +prompt> [Breakpoint #0 at Standard input code:3, hits: 1] >00003: echo "Hello, world!\n"; 00004: prompt> Hello, world! [Script ended normally] -prompt> [Breakpoint #0 at -:3, hits: 1] +prompt> [Breakpoint #0 at Standard input code:3, hits: 1] >00003: echo "Hello, world!\n"; 00004: -prompt>
\ No newline at end of file +prompt> diff --git a/sapi/phpdbg/tests/stepping_001.phpt b/sapi/phpdbg/tests/stepping_001.phpt index 76577b2767..2f25acc449 100644 --- a/sapi/phpdbg/tests/stepping_001.phpt +++ b/sapi/phpdbg/tests/stepping_001.phpt @@ -25,7 +25,7 @@ prompt> [L0 %s HANDLE_EXCEPTION 00005: } 00006: prompt> [L0 %s HANDLE_EXCEPTION %s] -[L9 %s CATCH "Exception" $e 1 %s] +[L9 %s CATCH<-128> "Exception" $e 1 %s] >00008: foo(); 00009: } catch (Exception $e) { 00010: echo "ok"; @@ -48,7 +48,7 @@ prompt> ... ok >00011: } finally { 00012: echo " ... ok"; 00013: } -prompt> [L14 %s RETURN 1 %s] +prompt> [L14 %s RETURN<-1> 1 %s] >00014: prompt> --FILE-- |