php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
phpdbg_utils.h File Reference

Go to the source code of this file.

Data Structures

struct  _phpdbg_color_t
 
struct  _phpdbg_element_t
 

Macros

#define PHPDBG_COLOR_LEN   12
 
#define PHPDBG_COLOR_D(color, code)
 
#define PHPDBG_COLOR_END    {NULL, 0L, {0}}
 
#define PHPDBG_ELEMENT_LEN   3
 
#define PHPDBG_ELEMENT_D(name, id)
 
#define PHPDBG_ELEMENT_END    {NULL, 0L, 0}
 
#define PHPDBG_COLOR_INVALID   -1
 
#define PHPDBG_COLOR_PROMPT   0
 
#define PHPDBG_COLOR_ERROR   1
 
#define PHPDBG_COLOR_NOTICE   2
 
#define PHPDBG_COLORS   3
 
#define PHPDBG_OUTPUT_BACKUP_DEFINES()
 
#define PHPDBG_OUTPUT_BACKUP_SWAP()
 
#define PHPDBG_OUTPUT_BACKUP()
 
#define PHPDBG_OUTPUT_BACKUP_RESTORE()
 

Typedefs

typedef struct _phpdbg_color_t phpdbg_color_t
 
typedef struct _phpdbg_element_t phpdbg_element_t
 
typedef int(* phpdbg_parse_var_func) (char *name, size_t len, char *keyname, size_t keylen, HashTable *parent, zval *zv)
 
typedef int(* phpdbg_parse_var_with_arg_func) (char *name, size_t len, char *keyname, size_t keylen, HashTable *parent, zval *zv, void *arg)
 

Functions

PHPDBG_API int phpdbg_is_numeric (const char *)
 
PHPDBG_API int phpdbg_is_empty (const char *)
 
PHPDBG_API int phpdbg_is_addr (const char *)
 
PHPDBG_API int phpdbg_is_class_method (const char *, size_t, char **, char **)
 
PHPDBG_API const char * phpdbg_current_file (void)
 
PHPDBG_API char * phpdbg_resolve_path (const char *)
 
PHPDBG_API char * phpdbg_trim (const char *, size_t, size_t *)
 
PHPDBG_API const zend_functionphpdbg_get_function (const char *, const char *)
 
PHPDBG_API const phpdbg_color_tphpdbg_get_color (const char *name, size_t name_length)
 
PHPDBG_API void phpdbg_set_color (int element, const phpdbg_color_t *color)
 
PHPDBG_API void phpdbg_set_color_ex (int element, const char *name, size_t name_length)
 
PHPDBG_API const phpdbg_color_tphpdbg_get_colors (void)
 
PHPDBG_API int phpdbg_get_element (const char *name, size_t len)
 
PHPDBG_API void phpdbg_set_prompt (const char *)
 
PHPDBG_API const char * phpdbg_get_prompt (void)
 
PHPDBG_API uint32_t phpdbg_get_terminal_width (void)
 
PHPDBG_API uint32_t phpdbg_get_terminal_height (void)
 
PHPDBG_API void phpdbg_set_async_io (int fd)
 
int phpdbg_rebuild_symtable (void)
 
int phpdbg_safe_class_lookup (const char *name, int name_length, zend_class_entry **ce)
 
char * phpdbg_get_property_key (char *key)
 
PHPDBG_API int phpdbg_parse_variable (char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_func callback, bool silent)
 
PHPDBG_API int phpdbg_parse_variable_with_arg (char *input, size_t len, HashTable *parent, size_t i, phpdbg_parse_var_with_arg_func callback, phpdbg_parse_var_with_arg_func step_cb, bool silent, void *arg)
 
int phpdbg_is_auto_global (char *name, int len)
 
char * phpdbg_short_zval_print (zval *zv, int maxlen)
 
PHPDBG_API bool phpdbg_check_caught_ex (zend_execute_data *ex, zend_object *exception)
 

Macro Definition Documentation

◆ PHPDBG_COLOR_D

#define PHPDBG_COLOR_D ( color,
code )
Value:
{color, sizeof(color)-1, code}
short color

Definition at line 36 of file phpdbg_utils.h.

◆ PHPDBG_COLOR_END

#define PHPDBG_COLOR_END    {NULL, 0L, {0}}

Definition at line 38 of file phpdbg_utils.h.

◆ PHPDBG_COLOR_ERROR

#define PHPDBG_COLOR_ERROR   1

Definition at line 48 of file phpdbg_utils.h.

◆ PHPDBG_COLOR_INVALID

#define PHPDBG_COLOR_INVALID   -1

Definition at line 46 of file phpdbg_utils.h.

◆ PHPDBG_COLOR_LEN

#define PHPDBG_COLOR_LEN   12

Definition at line 35 of file phpdbg_utils.h.

◆ PHPDBG_COLOR_NOTICE

#define PHPDBG_COLOR_NOTICE   2

Definition at line 49 of file phpdbg_utils.h.

◆ PHPDBG_COLOR_PROMPT

#define PHPDBG_COLOR_PROMPT   0

Definition at line 47 of file phpdbg_utils.h.

◆ PHPDBG_COLORS

#define PHPDBG_COLORS   3

Definition at line 50 of file phpdbg_utils.h.

◆ PHPDBG_ELEMENT_D

#define PHPDBG_ELEMENT_D ( name,
id )
Value:
{name, sizeof(name)-1, id}
zend_string * name

Definition at line 41 of file phpdbg_utils.h.

◆ PHPDBG_ELEMENT_END

#define PHPDBG_ELEMENT_END    {NULL, 0L, 0}

Definition at line 43 of file phpdbg_utils.h.

◆ PHPDBG_ELEMENT_LEN

#define PHPDBG_ELEMENT_LEN   3

Definition at line 40 of file phpdbg_utils.h.

◆ PHPDBG_OUTPUT_BACKUP

#define PHPDBG_OUTPUT_BACKUP ( )
Value:
PHPDBG_OUTPUT_BACKUP_SWAP()
#define PHPDBG_OUTPUT_BACKUP_DEFINES()

Definition at line 123 of file phpdbg_utils.h.

◆ PHPDBG_OUTPUT_BACKUP_DEFINES

#define PHPDBG_OUTPUT_BACKUP_DEFINES ( )
Value:
zend_output_globals *output_globals_ptr; \
zend_output_globals original_output_globals; \
output_globals_ptr = &output_globals;

Definition at line 112 of file phpdbg_utils.h.

◆ PHPDBG_OUTPUT_BACKUP_RESTORE

#define PHPDBG_OUTPUT_BACKUP_RESTORE ( )
Value:
*output_globals_ptr = original_output_globals;
PHPAPI void php_output_deactivate(void)
Definition output.c:176

Definition at line 127 of file phpdbg_utils.h.

◆ PHPDBG_OUTPUT_BACKUP_SWAP

#define PHPDBG_OUTPUT_BACKUP_SWAP ( )
Value:
original_output_globals = *output_globals_ptr; \
memset(output_globals_ptr, 0, sizeof(zend_output_globals)); \
php_output_activate();

Definition at line 118 of file phpdbg_utils.h.

Typedef Documentation

◆ phpdbg_color_t

◆ phpdbg_element_t

◆ phpdbg_parse_var_func

typedef int(* phpdbg_parse_var_func) (char *name, size_t len, char *keyname, size_t keylen, HashTable *parent, zval *zv)

Definition at line 86 of file phpdbg_utils.h.

◆ phpdbg_parse_var_with_arg_func

typedef int(* phpdbg_parse_var_with_arg_func) (char *name, size_t len, char *keyname, size_t keylen, HashTable *parent, zval *zv, void *arg)

Definition at line 87 of file phpdbg_utils.h.

Function Documentation

◆ phpdbg_check_caught_ex()

PHPDBG_API bool phpdbg_check_caught_ex ( zend_execute_data * ex,
zend_object * exception )

Definition at line 612 of file phpdbg_utils.c.

◆ phpdbg_current_file()

PHPDBG_API const char * phpdbg_current_file ( void )

Definition at line 157 of file phpdbg_utils.c.

◆ phpdbg_get_color()

PHPDBG_API const phpdbg_color_t * phpdbg_get_color ( const char * name,
size_t name_length )

Definition at line 227 of file phpdbg_utils.c.

◆ phpdbg_get_colors()

PHPDBG_API const phpdbg_color_t * phpdbg_get_colors ( void )

Definition at line 259 of file phpdbg_utils.c.

◆ phpdbg_get_element()

PHPDBG_API int phpdbg_get_element ( const char * name,
size_t len )

Definition at line 264 of file phpdbg_utils.c.

◆ phpdbg_get_function()

PHPDBG_API const zend_function * phpdbg_get_function ( const char * fname,
const char * cname )

Definition at line 168 of file phpdbg_utils.c.

◆ phpdbg_get_prompt()

PHPDBG_API const char * phpdbg_get_prompt ( void )

Definition at line 296 of file phpdbg_utils.c.

◆ phpdbg_get_property_key()

char * phpdbg_get_property_key ( char * key)

Definition at line 432 of file phpdbg_utils.c.

◆ phpdbg_get_terminal_height()

PHPDBG_API uint32_t phpdbg_get_terminal_height ( void )

Definition at line 368 of file phpdbg_utils.c.

◆ phpdbg_get_terminal_width()

PHPDBG_API uint32_t phpdbg_get_terminal_width ( void )

Definition at line 350 of file phpdbg_utils.c.

◆ phpdbg_is_addr()

PHPDBG_API int phpdbg_is_addr ( const char * str)

Definition at line 107 of file phpdbg_utils.c.

◆ phpdbg_is_auto_global()

int phpdbg_is_auto_global ( char * name,
int len )

Definition at line 608 of file phpdbg_utils.c.

◆ phpdbg_is_class_method()

PHPDBG_API int phpdbg_is_class_method ( const char * str,
size_t len,
char ** class,
char ** method )

Definition at line 112 of file phpdbg_utils.c.

◆ phpdbg_is_empty()

PHPDBG_API int phpdbg_is_empty ( const char * str)

Definition at line 93 of file phpdbg_utils.c.

◆ phpdbg_is_numeric()

PHPDBG_API int phpdbg_is_numeric ( const char * str)

Input scan functions

Definition at line 79 of file phpdbg_utils.c.

◆ phpdbg_parse_variable()

PHPDBG_API int phpdbg_parse_variable ( char * input,
size_t len,
HashTable * parent,
size_t i,
phpdbg_parse_var_func callback,
bool silent )

Definition at line 443 of file phpdbg_utils.c.

◆ phpdbg_parse_variable_with_arg()

PHPDBG_API int phpdbg_parse_variable_with_arg ( char * input,
size_t len,
HashTable * parent,
size_t i,
phpdbg_parse_var_with_arg_func callback,
phpdbg_parse_var_with_arg_func step_cb,
bool silent,
void * arg )

Definition at line 447 of file phpdbg_utils.c.

◆ phpdbg_rebuild_symtable()

int phpdbg_rebuild_symtable ( void )

Definition at line 336 of file phpdbg_utils.c.

◆ phpdbg_resolve_path()

PHPDBG_API char * phpdbg_resolve_path ( const char * path)

Definition at line 146 of file phpdbg_utils.c.

◆ phpdbg_safe_class_lookup()

int phpdbg_safe_class_lookup ( const char * name,
int name_length,
zend_class_entry ** ce )

Definition at line 398 of file phpdbg_utils.c.

◆ phpdbg_set_async_io()

PHPDBG_API void phpdbg_set_async_io ( int fd)

Definition at line 389 of file phpdbg_utils.c.

◆ phpdbg_set_color()

PHPDBG_API void phpdbg_set_color ( int element,
const phpdbg_color_t * color )

Definition at line 245 of file phpdbg_utils.c.

◆ phpdbg_set_color_ex()

PHPDBG_API void phpdbg_set_color_ex ( int element,
const char * name,
size_t name_length )

Definition at line 250 of file phpdbg_utils.c.

◆ phpdbg_set_prompt()

PHPDBG_API void phpdbg_set_prompt ( const char * prompt)

Definition at line 279 of file phpdbg_utils.c.

◆ phpdbg_short_zval_print()

char * phpdbg_short_zval_print ( zval * zv,
int maxlen )

Definition at line 660 of file phpdbg_utils.c.

◆ phpdbg_trim()

PHPDBG_API char * phpdbg_trim ( const char * str,
size_t len,
size_t * new_len )

Definition at line 197 of file phpdbg_utils.c.