- PSI_DEBUG_PRINT(cpp->parser, "PSI: CPP defined -> %s ", defined ? "true" : "false");
- if (defined) {
- struct psi_cpp_macro_decl *macro = zend_hash_find_ptr(&cpp->defs, tok->text);
- if (macro) {
- PSI_DEBUG_PRINT(cpp->parser, " @ %s:%u ", macro->token->file->val, macro->token->line);
+ psi_debug_lock(PSI_DATA(cpp->parser));
+ PSI_DEBUG_PRINT(cpp->parser, "PSI: CPP defined -> %s ", defined ? "true" : "false");
+ if (defined) {
+ struct psi_cpp_macro_decl *macro = zend_hash_find_ptr(&cpp->defs, tok->text);
+ if (macro) {
+ PSI_DEBUG_PRINT(cpp->parser, " @ %s:%u ", macro->token->file->val, macro->token->line);
+ }
+ } else {
+ zend_string *key;
+
+ PSI_DEBUG_PRINT(cpp->parser, " expanding=");
+ ZEND_HASH_FOREACH_STR_KEY(&cpp->expanding, key)
+ {
+ PSI_DEBUG_PRINT(cpp->parser, "%s,", key->val);
+ }
+ ZEND_HASH_FOREACH_END();
+ PSI_DEBUG_PRINT(cpp->parser, "\t");