Skip to content

Commit

Permalink
Add yasd.open_extended_info ini (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghantao authored May 15, 2021
1 parent a5f4045 commit cd3ef38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions php_yasd.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ZEND_BEGIN_MODULE_GLOBALS(yasd)
uint16_t remote_port;
uint16_t depth;
int log_level;
int open_extended_info;
ssize_t max_executed_opline_num;
ssize_t max_executed_milliseconds;

Expand Down
4 changes: 4 additions & 0 deletions src/base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ void yasd_rshutdown(int module_number) {
}

void yasd_minit(int module_number) {
if (YASD_G(open_extended_info)) {
CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
}

replace_execute_ex();

// it seems that -e does not work in PHP-FPM mode. so we need to add ZEND_COMPILE_EXTENDED_INFO ourselves.
Expand Down
2 changes: 2 additions & 0 deletions yasd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ STD_PHP_INI_ENTRY("yasd.max_executed_opline_num", "0", PHP_INI_ALL, OnUpdateLong
max_executed_opline_num, zend_yasd_globals, yasd_globals)
STD_PHP_INI_ENTRY("yasd.init_file", "", PHP_INI_ALL, OnUpdateStringUnempty,
init_file, zend_yasd_globals, yasd_globals)
STD_PHP_INI_ENTRY("yasd.open_extended_info", "0", PHP_INI_ALL, OnUpdateLong,
open_extended_info, zend_yasd_globals, yasd_globals)

// compatible with phpstorm
STD_PHP_INI_ENTRY("xdebug.coverage_enable", "1", PHP_INI_ALL, OnUpdateLong,
Expand Down

0 comments on commit cd3ef38

Please sign in to comment.