summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 1253eff..8550168 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -165,6 +165,22 @@ int sp_log_request(const zend_string* restrict folder,
165 fprintf(file, "RULE: sp%s%s\n", from, ZSTR_VAL(text_repr)); 165 fprintf(file, "RULE: sp%s%s\n", from, ZSTR_VAL(text_repr));
166 166
167 fprintf(file, "FILE: %s:%d\n", current_filename, current_line); 167 fprintf(file, "FILE: %s:%d\n", current_filename, current_line);
168
169
170 zend_execute_data *orig_execute_data = EG(current_execute_data);
171 zend_execute_data *current = EG(current_execute_data);
172 while (current) {
173 EG(current_execute_data) = current;
174 char* const complete_path_function = get_complete_function_path(current);
175 if (complete_path_function) {
176 const int current_line = zend_get_executed_lineno(TSRMLS_C);
177 fprintf(file, "STACKTRACE: %s:%d\n", complete_path_function, current_line);
178 }
179 current = current->prev_execute_data;
180 }
181 EG(current_execute_data) = orig_execute_data;
182
183
168 for (size_t i = 0; zones[i].str; i++) { 184 for (size_t i = 0; zones[i].str; i++) {
169 zval* variable_value; 185 zval* variable_value;
170 zend_string* variable_key; 186 zend_string* variable_key;