com php-src: Merge branch 'master' of https://github.com/krakjoe/phpdbg into lexer: phpdbg.c phpdbg_bp.c phpdbg_help.c phpd bg_prompt.c
| From: | Bob Weinand | Date: | Sun, 13 Apr 2014 07:06:42 +0000 |
| Subject: | com php-src: Merge branch 'master' of https://github.com/krakjoe/phpdbg into lexer: phpdbg.c phpdbg_bp.c phpdbg_help.c phpd bg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77009@lists.php.net to get a copy of this message | ||
Commit: ef86b57f3b6745d5215e1316512c108f46df8668
Author: krakjoe <joe.watkins@live.co.uk> Sun, 13 Apr 2014 08:06:42 +0100
Parents: 2fde2ada50a00512490511349389d08ede9822f8 3db29ee43960a4e164244a55b0e2a4b23a112e49
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ef86b57f3b6745d5215e1316512c108f46df8668
Log:
Merge branch 'master' of https://github.com/krakjoe/phpdbg into lexer
Conflicts:
phpdbg_prompt.c
Changed paths:
MM phpdbg.c
MM phpdbg_bp.c
MM phpdbg_help.c
MM phpdbg_prompt.c
Diff:
diff --cc phpdbg_prompt.c
index 31c5d25,c088535..3010c08
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@@ -347,40 -263,50 +347,52 @@@ void phpdbg_init(char *init_file, size_
PHPDBG_COMMAND(exec) /* {{{ */
{
- switch (param->type) {
- case STR_PARAM: {
- struct stat sb;
-
- if (VCWD_STAT(param->str, &sb) != FAILURE) {
- if (sb.st_mode & (S_IFREG|S_IFLNK)) {
- char *res = phpdbg_resolve_path(param->str TSRMLS_CC);
- size_t res_len = strlen(res);
-
- if ((res_len != PHPDBG_G(exec_len)) || (memcmp(res, PHPDBG_G(exec), res_len) != SUCCESS)) {
-
- if (PHPDBG_G(exec)) {
- phpdbg_notice("Unsetting old execution context: %s", PHPDBG_G(exec));
- efree(PHPDBG_G(exec));
- PHPDBG_G(exec) = NULL;
- PHPDBG_G(exec_len) = 0L;
- }
+ struct stat sb;
- if (PHPDBG_G(ops)) {
- phpdbg_notice("Destroying compiled opcodes");
- phpdbg_clean(0 TSRMLS_CC);
- }
+ if (VCWD_STAT(param->str, &sb) != FAILURE) {
+ if (sb.st_mode & (S_IFREG|S_IFLNK)) {
+ char *res = phpdbg_resolve_path(param->str TSRMLS_CC);
+ size_t res_len = strlen(res);
- PHPDBG_G(exec) = res;
- PHPDBG_G(exec_len) = res_len;
+ if ((res_len != PHPDBG_G(exec_len)) || (memcmp(res, PHPDBG_G(exec), res_len) != SUCCESS)) {
++<<<<<<< HEAD
+ if (PHPDBG_G(exec)) {
+ phpdbg_notice("Unsetting old execution context: %s", PHPDBG_G(exec));
+ efree(PHPDBG_G(exec));
+ PHPDBG_G(exec) = NULL;
+ PHPDBG_G(exec_len) = 0L;
+ }
+
+ if (PHPDBG_G(ops)) {
+ phpdbg_notice("Destroying compiled opcodes");
+ phpdbg_clean(0 TSRMLS_CC);
++=======
+ *SG(request_info).argv = PHPDBG_G(exec);
+ php_hash_environment(TSRMLS_C);
+
+ phpdbg_notice("Set execution context: %s", PHPDBG_G(exec));
+ } else {
+ phpdbg_notice("Execution context not changed");
+ }
+ } else {
+ phpdbg_error("Cannot use %s as execution context, not a valid file or symlink",
param->str);
++>>>>>>> 3db29ee43960a4e164244a55b0e2a4b23a112e49
}
+
+ PHPDBG_G(exec) = res;
+ PHPDBG_G(exec_len) = res_len;
+
+ phpdbg_notice("Set execution context: %s", PHPDBG_G(exec));
} else {
- phpdbg_error("Cannot stat %s, ensure the file exists", param->str);
+ phpdbg_notice("Execution context not changed");
}
- } break;
-
- phpdbg_default_switch_case();
+ } else {
+ phpdbg_error("Cannot use %s as execution context, not a valid file or symlink",
param->str);
+ }
+ } else {
+ phpdbg_error("Cannot stat %s, ensure the file exists", param->str);
}
-
return SUCCESS;
} /* }}} */