2013-11-10 10:44:42 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| 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_HELP_H
|
|
|
|
#define PHPDBG_HELP_H
|
|
|
|
|
2013-11-11 23:40:03 +00:00
|
|
|
#include "TSRM.h"
|
2013-11-17 21:01:41 +00:00
|
|
|
#include "phpdbg.h"
|
|
|
|
#include "phpdbg_cmd.h"
|
2013-11-10 18:06:41 +00:00
|
|
|
|
2013-11-17 21:01:41 +00:00
|
|
|
#define PHPDBG_HELP(name) PHPDBG_COMMAND(help_##name)
|
2013-11-10 10:44:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper Forward Declarations
|
|
|
|
*/
|
2013-11-10 11:03:29 +00:00
|
|
|
PHPDBG_HELP(exec);
|
2013-11-10 11:35:59 +00:00
|
|
|
PHPDBG_HELP(compile);
|
2013-11-10 14:28:14 +00:00
|
|
|
PHPDBG_HELP(step);
|
|
|
|
PHPDBG_HELP(next);
|
2013-11-10 13:06:57 +00:00
|
|
|
PHPDBG_HELP(run);
|
2013-11-10 14:43:46 +00:00
|
|
|
PHPDBG_HELP(eval);
|
2013-11-16 10:59:50 +00:00
|
|
|
PHPDBG_HELP(until);
|
2013-11-17 13:59:21 +00:00
|
|
|
PHPDBG_HELP(finish);
|
2013-11-17 15:39:23 +00:00
|
|
|
PHPDBG_HELP(leave);
|
2013-11-10 10:44:42 +00:00
|
|
|
PHPDBG_HELP(print);
|
2013-11-10 11:48:01 +00:00
|
|
|
PHPDBG_HELP(break);
|
2013-11-11 08:02:04 +00:00
|
|
|
PHPDBG_HELP(clean);
|
2013-11-11 13:31:41 +00:00
|
|
|
PHPDBG_HELP(clear);
|
2013-11-17 18:26:56 +00:00
|
|
|
PHPDBG_HELP(info);
|
2013-11-10 15:54:19 +00:00
|
|
|
PHPDBG_HELP(back);
|
2013-11-22 19:06:31 +00:00
|
|
|
PHPDBG_HELP(frame);
|
2013-11-10 21:23:18 +00:00
|
|
|
PHPDBG_HELP(quiet);
|
2013-11-11 23:40:03 +00:00
|
|
|
PHPDBG_HELP(list);
|
2013-11-14 21:10:44 +00:00
|
|
|
PHPDBG_HELP(oplog);
|
2013-11-19 01:48:21 +00:00
|
|
|
PHPDBG_HELP(register);
|
2013-11-22 19:50:13 +00:00
|
|
|
PHPDBG_HELP(options);
|
2013-11-18 13:03:33 +00:00
|
|
|
PHPDBG_HELP(shell);
|
2013-11-10 10:44:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Commands
|
|
|
|
*/
|
|
|
|
static const phpdbg_command_t phpdbg_help_commands[] = {
|
2013-11-17 21:01:41 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(exec, "the execution context should be a valid path", 'e', help_exec, NULL, 0),
|
2013-11-18 13:23:28 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(compile, "allow inspection of code before execution", 'c', help_compile, NULL, 0),
|
2013-11-18 00:42:07 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(step, "step through execution to break at every opcode", 's', help_step, NULL, 0),
|
2013-11-17 21:01:41 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(next, "continue executing while stepping or after breaking", 'n', help_next, NULL, 0),
|
2013-11-18 00:42:07 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(run, "execute inside the phpdbg vm", 'r', help_run, NULL, 0),
|
2013-11-18 13:23:28 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(eval, "access to eval() allows affecting the environment", 'E', help_eval, NULL, 0),
|
2013-11-18 00:42:07 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(until, "continue until the current line is executed", 'u', help_until, NULL, 0),
|
2013-11-22 19:06:31 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(finish, "continue until the current function has returned", 'F', help_finish, NULL, 0),
|
2013-11-17 21:01:41 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(leave, "continue until the current function is returning", 'L', help_leave, NULL, 0),
|
2013-11-18 13:23:28 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(print, "print context information or instructions", 'p', help_print, NULL, 0),
|
2013-11-17 21:01:41 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(break, "breakpoints allow execution interruption", 'b', help_break, NULL, 0),
|
2013-11-18 13:23:28 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(clean, "resetting the environment is useful while debugging", 'X', help_clean, NULL, 0),
|
|
|
|
PHPDBG_COMMAND_D_EX(clear, "reset breakpoints to execute without interruption", 'c', help_clear, NULL, 0),
|
2013-11-17 21:01:41 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(info, "quick access to useful information on the console", 'i', help_info, NULL, 0),
|
|
|
|
PHPDBG_COMMAND_D_EX(back, "show debug backtrace information during execution", 't', help_back, NULL, 0),
|
2013-11-22 19:06:31 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(frame, "switch to a frame in the current stack for inspection", 'f', help_frame, NULL, 0),
|
2013-11-18 14:51:08 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(quiet, "be quiet during execution", 'Q', help_quiet, NULL, 0),
|
2013-11-18 13:23:28 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(list, "list code gives you quick access to code", 'l', help_list, NULL, 0),
|
|
|
|
PHPDBG_COMMAND_D_EX(oplog, "keep clutter off the screen by logging oplines", 'O', help_oplog, NULL, 0),
|
2013-11-19 01:51:56 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(register, "register a function for use as a command", 'R', help_register,NULL, 0),
|
2013-11-22 19:50:13 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(options, "show information about command line options", 'o', help_options, NULL, 0),
|
2013-11-18 13:03:33 +00:00
|
|
|
PHPDBG_COMMAND_D_EX(shell, "execute system commands with direct shell access", '-', help_shell, NULL, 0),
|
2013-11-17 21:01:41 +00:00
|
|
|
PHPDBG_END_COMMAND
|
2013-11-10 10:44:42 +00:00
|
|
|
};
|
|
|
|
|
2013-11-16 20:57:10 +00:00
|
|
|
#define phpdbg_help_header() \
|
|
|
|
phpdbg_notice("Welcome to phpdbg, the interactive PHP debugger, v%s", PHPDBG_VERSION);
|
|
|
|
#define phpdbg_help_footer() \
|
|
|
|
phpdbg_notice("Please report bugs to <%s>", PHPDBG_ISSUES);
|
|
|
|
|
2013-11-10 10:44:42 +00:00
|
|
|
#endif /* PHPDBG_HELP_H */
|