diff options
author | Anatol Belski <ab@php.net> | 2014-11-18 21:18:52 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-11-18 21:18:52 +0100 |
commit | c6bad96f306df8e8b656472e618283ced5083cdb (patch) | |
tree | 7e5b52aa07777f0336b0944a228bf66f8f56b31f /sapi/phpdbg/phpdbg_list.c | |
parent | 4262663e4caa82ba17666781a95bdcb872b4e109 (diff) | |
parent | 64a39dc7b07d4b54d050a3a5c15045fe91c0b651 (diff) | |
download | php-git-c6bad96f306df8e8b656472e618283ced5083cdb.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
NEWS
add test for bug #68381
Fixed bug #68381 Set FPM log level earlier during init
proper dllexport
move to size_t where zend_string is used internally
fix some datatype mismatches
return after the warning, to fix uninitialized salt usage
fix datatype mismatches
add missing type specifier
fix datatype mismatches
fix unsigned check
"extern" shouldn't be used for definitions
joined identical conditional blocks
simplify fpm tests
SEND_VAR_NO_REF optimization
Add test for bug #68442
Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
Add new FPM test for IPv4/IPv6
...
Conflicts:
win32/build/config.w32
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index de03a3651e..f201be9850 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -126,8 +126,16 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli { uint line, lastline; phpdbg_file_source *data; + char resolved_path_buf[MAXPATHLEN]; + const char *abspath; - if (!(data = zend_hash_find_ptr(&PHPDBG_G(file_sources), filename))) { + if (VCWD_REALPATH(filename->val, resolved_path_buf)) { + abspath = resolved_path_buf; + } else { + abspath = filename->val; + } + + if (!(data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), abspath, strlen(abspath)))) { phpdbg_error("list", "type=\"unknownfile\"", "Could not find information about included file..."); return; } @@ -230,6 +238,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type TSRMLS_DC) { char *filename = (char *)(file->opened_path ? file->opened_path : file->filename); uint line; char *bufptr, *endptr; + char resolved_path_buf[MAXPATHLEN]; zend_stream_fixup(file, &data.buf, &data.len TSRMLS_CC); @@ -256,6 +265,9 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type TSRMLS_DC) { fake.opened_path = file->opened_path; *(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data; + if (VCWD_REALPATH(filename, resolved_path_buf)) { + filename = resolved_path_buf; + } for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) { if (*bufptr == '\n') { @@ -267,6 +279,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type TSRMLS_DC) { dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line); zend_hash_str_add_ptr(&PHPDBG_G(file_sources), filename, strlen(filename), dataptr); + phpdbg_resolve_pending_file_break(filename TSRMLS_CC); ret = PHPDBG_G(compile_file)(&fake, type TSRMLS_CC); |