php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
phpdbg_cmd.h File Reference
#include "TSRM.h"
#include "zend_generators.h"

Go to the source code of this file.

Data Structures

struct  _phpdbg_param
 
struct  _phpdbg_command_t
 
struct  phpdbg_frame_t
 

Macros

#define phpdbg_init_param(v, t)
 
#define PHPDBG_ASYNC_SAFE   1
 
#define PHPDBG_STRL(s)
 
#define PHPDBG_MAX_CMD   500
 
#define PHPDBG_FRAME(v)
 
#define PHPDBG_EX(v)
 
#define PHPDBG_COMMAND_HANDLER(name)
 
#define PHPDBG_COMMAND_D_EXP(name, tip, alias, handler, children, args, parent, flags)
 
#define PHPDBG_COMMAND_D_EX(name, tip, alias, handler, children, args, flags)
 
#define PHPDBG_COMMAND_D(name, tip, alias, children, args, flags)
 
#define PHPDBG_COMMAND(name)
 
#define PHPDBG_COMMAND_ARGS   param
 
#define PHPDBG_END_COMMAND   {NULL, 0, NULL, 0, '\0', NULL, NULL, NULL, NULL, 0}
 
#define phpdbg_default_switch_case()
 

Typedefs

typedef struct _phpdbg_param phpdbg_param_t
 
typedef int(* phpdbg_command_handler_t) (const phpdbg_param_t *)
 
typedef struct _phpdbg_command_t phpdbg_command_t
 

Enumerations

enum  { NO_ARG = 0 , REQUIRED_ARG , OPTIONAL_ARG }
 
enum  phpdbg_param_type {
  EMPTY_PARAM = 0 , ADDR_PARAM , FILE_PARAM , NUMERIC_FILE_PARAM ,
  METHOD_PARAM , STR_PARAM , NUMERIC_PARAM , NUMERIC_FUNCTION_PARAM ,
  NUMERIC_METHOD_PARAM , STACK_PARAM , EVAL_PARAM , SHELL_PARAM ,
  COND_PARAM , OP_PARAM , ORIG_PARAM , RUN_PARAM
}
 

Functions

PHPDBG_API char * phpdbg_read_input (const char *buffered)
 
PHPDBG_API void phpdbg_destroy_input (char **input)
 
PHPDBG_API int phpdbg_ask_user_permission (const char *question)
 
PHPDBG_API void phpdbg_stack_push (phpdbg_param_t *stack, phpdbg_param_t *param)
 
PHPDBG_API void phpdbg_stack_separate (phpdbg_param_t *param)
 
PHPDBG_API const phpdbg_command_tphpdbg_stack_resolve (const phpdbg_command_t *commands, const phpdbg_command_t *parent, phpdbg_param_t **top)
 
PHPDBG_API int phpdbg_stack_verify (const phpdbg_command_t *command, phpdbg_param_t **stack)
 
PHPDBG_API int phpdbg_stack_execute (phpdbg_param_t *stack, bool allow_async_unsafe)
 
PHPDBG_API void phpdbg_stack_free (phpdbg_param_t *stack)
 
PHPDBG_API void phpdbg_clear_param (phpdbg_param_t *)
 
PHPDBG_API void phpdbg_copy_param (const phpdbg_param_t *, phpdbg_param_t *)
 
PHPDBG_API bool phpdbg_match_param (const phpdbg_param_t *, const phpdbg_param_t *)
 
PHPDBG_API zend_ulong phpdbg_hash_param (const phpdbg_param_t *)
 
PHPDBG_API const char * phpdbg_get_param_type (const phpdbg_param_t *)
 
PHPDBG_API char * phpdbg_param_tostring (const phpdbg_param_t *param, char **pointer)
 
PHPDBG_API void phpdbg_param_debug (const phpdbg_param_t *param, const char *msg)
 

Macro Definition Documentation

◆ PHPDBG_ASYNC_SAFE

#define PHPDBG_ASYNC_SAFE   1

Definition at line 84 of file phpdbg_cmd.h.

◆ PHPDBG_COMMAND

#define PHPDBG_COMMAND ( name)
Value:
int phpdbg_do_##name(const phpdbg_param_t *param)
struct _phpdbg_param phpdbg_param_t
Definition phpdbg_cmd.h:51
zend_string * name

Definition at line 167 of file phpdbg_cmd.h.

◆ PHPDBG_COMMAND_ARGS

#define PHPDBG_COMMAND_ARGS   param

Definition at line 169 of file phpdbg_cmd.h.

◆ PHPDBG_COMMAND_D

#define PHPDBG_COMMAND_D ( name,
tip,
alias,
children,
args,
flags )
Value:
{PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, phpdbg_do_##name, children, args, NULL, flags}
#define NULL
Definition gdcache.h:45
#define PHPDBG_STRL(s)
Definition phpdbg_cmd.h:104
zval * args

Definition at line 164 of file phpdbg_cmd.h.

◆ PHPDBG_COMMAND_D_EX

#define PHPDBG_COMMAND_D_EX ( name,
tip,
alias,
handler,
children,
args,
flags )
Value:
{PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, phpdbg_do_##handler, children, args, NULL, flags}
fbc internal_function handler(call, ret)

Definition at line 161 of file phpdbg_cmd.h.

◆ PHPDBG_COMMAND_D_EXP

#define PHPDBG_COMMAND_D_EXP ( name,
tip,
alias,
handler,
children,
args,
parent,
flags )
Value:
{PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, phpdbg_do_##handler, children, args, parent, flags}

Definition at line 158 of file phpdbg_cmd.h.

◆ PHPDBG_COMMAND_HANDLER

#define PHPDBG_COMMAND_HANDLER ( name)
Value:
phpdbg_do_##name

Command Declarators

Definition at line 156 of file phpdbg_cmd.h.

◆ phpdbg_default_switch_case

#define phpdbg_default_switch_case ( )
Value:
default: \
phpdbg_error("Unsupported parameter type (%s) for command", phpdbg_get_param_type(param)); \
break
PHPDBG_API const char * phpdbg_get_param_type(const phpdbg_param_t *param)
Definition phpdbg_cmd.c:49

Definition at line 176 of file phpdbg_cmd.h.

◆ PHPDBG_END_COMMAND

#define PHPDBG_END_COMMAND   {NULL, 0, NULL, 0, '\0', NULL, NULL, NULL, NULL, 0}

Definition at line 171 of file phpdbg_cmd.h.

◆ PHPDBG_EX

#define PHPDBG_EX ( v)
Value:
(EG(current_execute_data)->v)
#define EG(v)

Definition at line 107 of file phpdbg_cmd.h.

◆ PHPDBG_FRAME

#define PHPDBG_FRAME ( v)
Value:
#define PHPDBG_G(v)
Definition phpdbg.h:102
phpdbg_frame_t frame
Definition phpdbg.h:236

Definition at line 106 of file phpdbg_cmd.h.

◆ phpdbg_init_param

#define phpdbg_init_param ( v,
t )
Value:
do{ \
(v)->type = (t); \
(v)->addr = 0; \
(v)->num = 0; \
(v)->file.name = NULL; \
(v)->file.line = 0; \
(v)->method.class = NULL; \
(v)->method.name = NULL; \
(v)->str = NULL; \
(v)->len = 0; \
(v)->next = NULL; \
(v)->top = NULL; \
} while(0)
size_t len
Definition apprentice.c:174
file(string $filename, int $flags=0, $context=null)
uint32_t v
Definition cdf.c:1237
zend_ffi_type * type
Definition ffi.c:3812
#define next(ls)
Definition minilua.c:2661
original_stack top

Definition at line 70 of file phpdbg_cmd.h.

◆ PHPDBG_MAX_CMD

#define PHPDBG_MAX_CMD   500

Definition at line 105 of file phpdbg_cmd.h.

◆ PHPDBG_STRL

#define PHPDBG_STRL ( s)
Value:
s, sizeof(s)-1
char s[4]
Definition cdf.c:77

Definition at line 104 of file phpdbg_cmd.h.

Typedef Documentation

◆ phpdbg_command_handler_t

typedef int(* phpdbg_command_handler_t) (const phpdbg_param_t *)

Definition at line 86 of file phpdbg_cmd.h.

◆ phpdbg_command_t

Definition at line 88 of file phpdbg_cmd.h.

◆ phpdbg_param_t

typedef struct _phpdbg_param phpdbg_param_t

Definition at line 51 of file phpdbg_cmd.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NO_ARG 
REQUIRED_ARG 
OPTIONAL_ARG 

Definition at line 26 of file phpdbg_cmd.h.

◆ phpdbg_param_type

Enumerator
EMPTY_PARAM 
ADDR_PARAM 
FILE_PARAM 
NUMERIC_FILE_PARAM 
METHOD_PARAM 
STR_PARAM 
NUMERIC_PARAM 
NUMERIC_FUNCTION_PARAM 
NUMERIC_METHOD_PARAM 
STACK_PARAM 
EVAL_PARAM 
SHELL_PARAM 
COND_PARAM 
OP_PARAM 
ORIG_PARAM 
RUN_PARAM 

Definition at line 32 of file phpdbg_cmd.h.

Function Documentation

◆ phpdbg_ask_user_permission()

PHPDBG_API int phpdbg_ask_user_permission ( const char * question)

Definition at line 816 of file phpdbg_cmd.c.

◆ phpdbg_clear_param()

PHPDBG_API void phpdbg_clear_param ( phpdbg_param_t * param)

Definition at line 75 of file phpdbg_cmd.c.

◆ phpdbg_copy_param()

PHPDBG_API void phpdbg_copy_param ( const phpdbg_param_t * src,
phpdbg_param_t * dest )

Definition at line 138 of file phpdbg_cmd.c.

◆ phpdbg_destroy_input()

PHPDBG_API void phpdbg_destroy_input ( char ** input)

Definition at line 811 of file phpdbg_cmd.c.

◆ phpdbg_get_param_type()

PHPDBG_API const char * phpdbg_get_param_type ( const phpdbg_param_t * param)

Definition at line 49 of file phpdbg_cmd.c.

◆ phpdbg_hash_param()

PHPDBG_API zend_ulong phpdbg_hash_param ( const phpdbg_param_t * param)

Definition at line 196 of file phpdbg_cmd.c.

◆ phpdbg_match_param()

PHPDBG_API bool phpdbg_match_param ( const phpdbg_param_t * l,
const phpdbg_param_t * r )

Definition at line 251 of file phpdbg_cmd.c.

◆ phpdbg_param_debug()

PHPDBG_API void phpdbg_param_debug ( const phpdbg_param_t * param,
const char * msg )

Definition at line 326 of file phpdbg_cmd.c.

◆ phpdbg_param_tostring()

PHPDBG_API char * phpdbg_param_tostring ( const phpdbg_param_t * param,
char ** pointer )

Definition at line 96 of file phpdbg_cmd.c.

◆ phpdbg_read_input()

PHPDBG_API char * phpdbg_read_input ( const char * buffered)

Definition at line 745 of file phpdbg_cmd.c.

◆ phpdbg_stack_execute()

PHPDBG_API int phpdbg_stack_execute ( phpdbg_param_t * stack,
bool allow_async_unsafe )

Definition at line 720 of file phpdbg_cmd.c.

◆ phpdbg_stack_free()

PHPDBG_API void phpdbg_stack_free ( phpdbg_param_t * stack)

Definition at line 377 of file phpdbg_cmd.c.

◆ phpdbg_stack_push()

PHPDBG_API void phpdbg_stack_push ( phpdbg_param_t * stack,
phpdbg_param_t * param )

Stack Management

Definition at line 437 of file phpdbg_cmd.c.

◆ phpdbg_stack_resolve()

PHPDBG_API const phpdbg_command_t * phpdbg_stack_resolve ( const phpdbg_command_t * commands,
const phpdbg_command_t * parent,
phpdbg_param_t ** top )

Definition at line 575 of file phpdbg_cmd.c.

◆ phpdbg_stack_separate()

PHPDBG_API void phpdbg_stack_separate ( phpdbg_param_t * param)

Definition at line 462 of file phpdbg_cmd.c.

◆ phpdbg_stack_verify()

PHPDBG_API int phpdbg_stack_verify ( const phpdbg_command_t * command,
phpdbg_param_t ** stack )

Definition at line 471 of file phpdbg_cmd.c.