mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
79 lines
2.6 KiB
C
79 lines
2.6 KiB
C
/*
|
|
+----------------------------------------------------------------------+
|
|
| 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_PROMPT_H
|
|
#define PHPDBG_PROMPT_H
|
|
|
|
/**
|
|
* Maximum command length
|
|
*/
|
|
#define PHPDBG_MAX_CMD 500
|
|
|
|
#define PHPDBG_STRL(s) s, sizeof(s)-1
|
|
|
|
/**
|
|
* Command handler
|
|
*/
|
|
typedef int (*phpdbg_command_handler_t)(const char* expr, size_t expr_len TSRMLS_DC);
|
|
|
|
/**
|
|
* Command representation
|
|
*/
|
|
typedef struct _phpdbg_command_t {
|
|
const char *name; /* Command name */
|
|
size_t name_len; /* Command name length */
|
|
const char *tip; /* Menu tip */
|
|
size_t tip_len; /* Menu tip length */
|
|
phpdbg_command_handler_t handler; /* Command handler */
|
|
} phpdbg_command_t;
|
|
|
|
|
|
/**
|
|
* Breakpoint file-based representation
|
|
*/
|
|
typedef struct _phpdbg_breakfile_t {
|
|
const char *filename;
|
|
long line;
|
|
} phpdbg_breakfile_t;
|
|
|
|
/**
|
|
* Breakpoint symbol-based representation
|
|
*/
|
|
typedef struct _phpdbg_breaksymbol_t {
|
|
const char *symbol;
|
|
} phpdbg_breaksymbol_t;
|
|
|
|
/**
|
|
* Command Executor
|
|
*/
|
|
int phpdbg_do_cmd(const phpdbg_command_t *command, char *cmd_line, size_t cmd_len TSRMLS_DC);
|
|
|
|
/**
|
|
* Command Declarators
|
|
*/
|
|
#define PHPDBG_COMMAND_D(name, tip) \
|
|
{PHPDBG_STRL(#name), tip, sizeof(tip)-1, phpdbg_do_##name}
|
|
#define PHPDBG_COMMAND(name) \
|
|
int phpdbg_do_##name(const char *expr, size_t expr_len TSRMLS_DC)
|
|
|
|
int phpdbg_interactive(int argc, char **argv TSRMLS_DC);
|
|
void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC);
|
|
|
|
#endif /* PHPDBG_PROMPT_H */
|