diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-10-25 18:59:48 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-10-25 18:59:48 +0200 |
commit | 24babb01946ccb63b993b98b161455475a697d42 (patch) | |
tree | 4d8f727a26125ebbaf4eb0e74513c66c085301a2 /sapi/phpdbg/phpdbg_list.c | |
parent | 3794431b7818cb1a8ed1464dd89428ea8011cee2 (diff) | |
parent | bbcee18b4b6d9220d4fdcb0d69a33979a5fa84a4 (diff) | |
download | php-git-24babb01946ccb63b993b98b161455475a697d42.tar.gz |
Merge phpdbg into PHP-5.6
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index 80b5d2b189..7aa8c4f9e0 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -128,6 +128,11 @@ void phpdbg_list_file(const char *filename, uint count, int offset, uint highlig { uint line, lastline; phpdbg_file_source **data; + char resolved_path_buf[MAXPATHLEN]; + + if (VCWD_REALPATH(filename, resolved_path_buf)) { + filename = resolved_path_buf; + } if (zend_hash_find(&PHPDBG_G(file_sources), filename, strlen(filename), (void **) &data) == FAILURE) { phpdbg_error("list", "type=\"unknownfile\"", "Could not find information about included file..."); @@ -232,6 +237,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); @@ -258,6 +264,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; + } zend_hash_add(&PHPDBG_G(file_sources), filename, strlen(filename), &dataptr, sizeof(phpdbg_file_source *), NULL); for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) { |