php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
phpdbg_info.c File Reference
#include "php.h"
#include "phpdbg.h"
#include "phpdbg_utils.h"
#include "phpdbg_info.h"
#include "phpdbg_bp.h"
#include "phpdbg_prompt.h"

Go to the source code of this file.

Macros

#define PHPDBG_INFO_COMMAND_D(f, h, a, m, l, s, flags)
 
#define VARIABLEINFO(msg, ...)
 
#define VARIABLEINFO(msg, ...)
 

Functions

 phpdbg_print_breakpoints (PHPDBG_BREAK_SYM)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_METHOD)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_OPLINE)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_FILE_OPLINE)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_FUNCTION_OPLINE)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_METHOD_OPLINE)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_COND)
 
 phpdbg_print_breakpoints (PHPDBG_BREAK_OPCODE)
 
 phpdbg_end_try_access ()
 
 if (EG(zend_constants))
 
 phpdbg_notice ("User-defined constants (%d)", zend_hash_num_elements(&consts))
 
 if (zend_hash_num_elements(&consts))
 
 if (in_executor||PHPDBG_G(ops))
 
 if (PHPDBG_G(flags) &PHPDBG_IN_SIGNAL_HANDLER)
 
 if ((is_mm=is_zend_mm()))
 
 if (orig_heap)
 
 if (is_mm)
 
 phpdbg_notice ("User Classes (%d)", zend_hash_num_elements(&classes))
 
 if (HT_IS_INITIALIZED(&classes))
 
 phpdbg_notice ("User Functions (%d)", zend_hash_num_elements(&functions))
 

Variables

const phpdbg_command_t phpdbg_info_commands []
 
return SUCCESS
 
 phpdbg_try_access
 
 phpdbg_catch_access
 
zend_constantdata
 
zend_hash_initconsts
 
 else
 
zend_mm_heaporig_heap = NULL
 
bool is_mm
 
HashTable classes
 
HashTable functions
 

Macro Definition Documentation

◆ PHPDBG_INFO_COMMAND_D

#define PHPDBG_INFO_COMMAND_D ( f,
h,
a,
m,
l,
s,
flags )
Value:
char s[4]
Definition cdf.c:77
#define PHPDBG_COMMAND_D_EXP(name, tip, alias, handler, children, args, parent, flags)
Definition phpdbg_cmd.h:158
const phpdbg_command_t phpdbg_prompt_commands[]
$obj a
Definition test.php:84

Definition at line 28 of file phpdbg_info.c.

◆ VARIABLEINFO [1/2]

#define VARIABLEINFO ( msg,
... )
Value:
"%-18p %-7d %-9s %.*s" msg, &data->value, \
Z_REFCOUNTED(data->value) ? Z_REFCOUNT(data->value) : 1, \
(int) ZSTR_LEN(data->name), ZSTR_VAL(data->name), ##__VA_ARGS__)
char * msg
Definition phpdbg.h:289
zend_constant * data
#define phpdbg_writeln(strfmt,...)
Definition phpdbg_out.h:45
ZEND_API const char * zend_get_type_by_const(int type)
Definition zend_API.c:112
#define ZSTR_VAL(zstr)
Definition zend_string.h:68
#define ZSTR_LEN(zstr)
Definition zend_string.h:69
#define Z_REFCOUNTED(zval)
Definition zend_types.h:917
#define Z_REFCOUNT(z)
#define Z_TYPE(zval)
Definition zend_types.h:659

◆ VARIABLEINFO [2/2]

#define VARIABLEINFO ( msg,
... )
Value:
"%-18p %-7d %-9s %s$%.*s" msg, data, Z_REFCOUNTED_P(data) ? Z_REFCOUNT_P(data) : 1, zend_get_type_by_const(Z_TYPE_P(data)), isref, (int) ZSTR_LEN(var), ZSTR_VAL(var), ##__VA_ARGS__)
#define Z_TYPE_P(zval_p)
Definition zend_types.h:660
#define Z_REFCOUNTED_P(zval_p)
Definition zend_types.h:921
#define Z_REFCOUNT_P(pz)

Function Documentation

◆ if() [1/8]

if ( (is_mm=is_zend_mm()) )

Definition at line 350 of file phpdbg_info.c.

◆ if() [2/8]

if ( EG(zend_constants) )

Definition at line 106 of file phpdbg_info.c.

◆ if() [3/8]

if ( HT_IS_INITIALIZED & classes)

Definition at line 402 of file phpdbg_info.c.

◆ if() [4/8]

if ( in_executor|| PHPDBG_Gops)

Definition at line 308 of file phpdbg_info.c.

◆ if() [5/8]

if ( is_mm )

Definition at line 360 of file phpdbg_info.c.

◆ if() [6/8]

if ( orig_heap )

Definition at line 356 of file phpdbg_info.c.

◆ if() [7/8]

if ( PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER)

Definition at line 347 of file phpdbg_info.c.

◆ if() [8/8]

if ( zend_hash_num_elements & consts)

Definition at line 120 of file phpdbg_info.c.

◆ phpdbg_end_try_access()

phpdbg_end_try_access ( )

◆ phpdbg_notice() [1/3]

phpdbg_notice ( "User Classes (%d)" ,
zend_hash_num_elements & classes )

◆ phpdbg_notice() [2/3]

phpdbg_notice ( "User Functions (%d)" ,
zend_hash_num_elements & functions )

◆ phpdbg_notice() [3/3]

phpdbg_notice ( "User-defined constants (%d)" ,
zend_hash_num_elements & consts )

◆ phpdbg_print_breakpoints() [1/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_COND )

◆ phpdbg_print_breakpoints() [2/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_FILE_OPLINE )

◆ phpdbg_print_breakpoints() [3/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_FUNCTION_OPLINE )

◆ phpdbg_print_breakpoints() [4/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_METHOD )

◆ phpdbg_print_breakpoints() [5/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_METHOD_OPLINE )

◆ phpdbg_print_breakpoints() [6/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_OPCODE )

◆ phpdbg_print_breakpoints() [7/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_OPLINE )

◆ phpdbg_print_breakpoints() [8/8]

phpdbg_print_breakpoints ( PHPDBG_BREAK_SYM )

Variable Documentation

◆ classes

zend_hash_destroy & classes
Initial value:
{
struct _zend_class_entry zend_class_entry

Definition at line 385 of file phpdbg_info.c.

◆ consts

zend_hash_init& consts

Definition at line 104 of file phpdbg_info.c.

◆ data

Initial value:
{
zend_hash_init & consts
struct _zend_array HashTable
Definition zend_types.h:386

Definition at line 102 of file phpdbg_info.c.

◆ else

else
Initial value:
{
phpdbg_error("Not executing!")
#define phpdbg_error(strfmt,...)
Definition phpdbg_out.h:43

Definition at line 334 of file phpdbg_info.c.

◆ functions

zend_hash_destroy & functions
Initial value:
{
union _zend_function zend_function

Definition at line 434 of file phpdbg_info.c.

◆ is_mm

bool is_mm

Definition at line 345 of file phpdbg_info.c.

◆ orig_heap

zend_mm_heap* orig_heap = NULL

Definition at line 344 of file phpdbg_info.c.

◆ phpdbg_catch_access

phpdbg_catch_access
Initial value:
{
phpdbg_error("Could not fetch included file count, invalid data source")

Definition at line 66 of file phpdbg_info.c.

◆ phpdbg_info_commands

const phpdbg_command_t phpdbg_info_commands[]
Initial value:
= {
PHPDBG_INFO_COMMAND_D(break, "show breakpoints", 'b', info_break, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(files, "show included files", 'F', info_files, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(classes, "show loaded classes", 'c', info_classes, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(funcs, "show loaded classes", 'f', info_funcs, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(error, "show last error", 'e', info_error, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(constants, "show user defined constants", 'd', info_constants, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(vars, "show active variables", 'v', info_vars, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(globals, "show superglobals", 'g', info_globals, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(literal, "show active literal constants", 'l', info_literal, NULL, 0, PHPDBG_ASYNC_SAFE),
PHPDBG_INFO_COMMAND_D(memory, "show memory manager stats", 'm', info_memory, NULL, 0, PHPDBG_ASYNC_SAFE),
}
error($message)
Definition ext_skel.php:22
#define NULL
Definition gdcache.h:45
#define PHPDBG_END_COMMAND
Definition phpdbg_cmd.h:171
#define PHPDBG_ASYNC_SAFE
Definition phpdbg_cmd.h:84
#define PHPDBG_INFO_COMMAND_D(f, h, a, m, l, s, flags)
Definition phpdbg_info.c:28

Definition at line 31 of file phpdbg_info.c.

◆ phpdbg_try_access

phpdbg_try_access
Initial value:
{
phpdbg_notice("Included files: %d", zend_hash_num_elements(&EG(included_files)))
#define phpdbg_notice(strfmt,...)
Definition phpdbg_out.h:44
#define EG(v)

Definition at line 64 of file phpdbg_info.c.

◆ SUCCESS

return SUCCESS

Definition at line 57 of file phpdbg_info.c.