if test "$PHP_PHPDBG" != "no"; then
AC_DEFINE(HAVE_PHPDBG, 1, [ ])
-
+
if test "$PHP_PHPDBG_DEBUG" != "no"; then
AC_DEFINE(PHPDBG_DEBUG, 1, [ ])
else
AC_DEFINE(PHPDBG_DEBUG, 0, [ ])
fi
-
+
PHP_PHPDBG_CFLAGS="-I$abc_srcdir"
- PHP_PHPDBG_FILES="phpdbg.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c"
+ PHP_PHPDBG_FILES="phpdbg.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c"
PHP_SUBST(PHP_PHPDBG_CFLAGS)
PHP_SUBST(PHP_PHPDBG_FILES)
--- /dev/null
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2013 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Felipe Pena <felipe@php.net> |
+ | Authors: Joe Watkins <joe.watkins@live.co.uk> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "phpdbg_utils.h"
+#include "phpdbg_info.h"
+
+PHPDBG_INFO(files) /* {{{ */
+{
+ HashPosition pos;
+ char *fname;
+
+ phpdbg_notice("Included files: %d",
+ zend_hash_num_elements(&EG(included_files)));
+
+ zend_hash_internal_pointer_reset_ex(&EG(included_files), &pos);
+ while (zend_hash_get_current_key_ex(&EG(included_files), &fname,
+ NULL, NULL, 0, &pos) == HASH_KEY_IS_STRING) {
+ phpdbg_writeln("File: %s", fname);
+ zend_hash_move_forward_ex(&EG(included_files), &pos);
+ }
+
+ return SUCCESS;
+} /* }}} */
--- /dev/null
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2013 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Felipe Pena <felipe@php.net> |
+ | Authors: Joe Watkins <joe.watkins@live.co.uk> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef PHPDBG_INFO_H
+#define PHPDBG_INFO_H
+
+#include "TSRM.h"
+#include "phpdbg.h"
+#include "phpdbg_prompt.h"
+#include "phpdbg_utils.h"
+
+/**
+ * Command Declarators
+ */
+#define PHPDBG_INFO_HANDLER(name) phpdbg_do_info_##name
+#define PHPDBG_INFO_D(name, tip) \
+ {PHPDBG_STRL(#name), tip, sizeof(tip)-1, 0, phpdbg_do_info_##name, NULL}
+#define PHPDBG_INFO_EX_D(name, tip, alias) \
+ {PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, phpdbg_do_info_##name, NULL}
+#define PHPDBG_INFO(name) \
+ int PHPDBG_INFO_HANDLER(name)(phpdbg_param_t *param TSRMLS_DC)
+
+PHPDBG_INFO(files);
+
+static const phpdbg_command_t phpdbg_info_commands[] = {
+ PHPDBG_INFO_EX_D(files, "lists included files", 'f'),
+ {NULL, 0, 0}
+};
+
+#endif /* PHPDBG_INFO_H */
#include "phpdbg.h"
#include "phpdbg_help.h"
#include "phpdbg_print.h"
+#include "phpdbg_info.h"
#include "phpdbg_break.h"
#include "phpdbg_bp.h"
#include "phpdbg_opcode.h"
static PHPDBG_COMMAND(break);
static PHPDBG_COMMAND(back);
static PHPDBG_COMMAND(list);
+static PHPDBG_COMMAND(info);
static PHPDBG_COMMAND(clean);
static PHPDBG_COMMAND(clear);
static PHPDBG_COMMAND(help);
PHPDBG_COMMANDS_D(break, "set breakpoint", 'b', phpdbg_break_commands),
PHPDBG_COMMAND_EX_D(back, "show trace", 't'),
PHPDBG_COMMANDS_D(list, "lists some code", 'l', phpdbg_list_commands),
+ PHPDBG_COMMANDS_D(info, "displays some informations", 'i', phpdbg_info_commands),
PHPDBG_COMMAND_EX_D(clean, "clean the execution environment", 'X'),
PHPDBG_COMMAND_EX_D(clear, "clear breakpoints", 'C'),
PHPDBG_COMMANDS_D(help, "show help menu", 'h', phpdbg_help_commands),
return SUCCESS;
} /* }}} */
+static PHPDBG_COMMAND(info) /* {{{ */
+{
+ return SUCCESS;
+} /* }}} */
+
static PHPDBG_COMMAND(break) /* {{{ */
{
switch (param->type) {