diff options
Diffstat (limited to 'source/components/parser/pswalk.c')
| -rw-r--r-- | source/components/parser/pswalk.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c index eb57e36a9cef..db4999e08de5 100644 --- a/source/components/parser/pswalk.c +++ b/source/components/parser/pswalk.c @@ -169,6 +169,8 @@ * ******************************************************************************/ +#include "amlcode.h" + void AcpiPsDeleteParseTree ( ACPI_PARSE_OBJECT *SubtreeRoot) @@ -176,19 +178,40 @@ AcpiPsDeleteParseTree ( ACPI_PARSE_OBJECT *Op = SubtreeRoot; ACPI_PARSE_OBJECT *Next = NULL; ACPI_PARSE_OBJECT *Parent = NULL; + UINT32 Level = 0; ACPI_FUNCTION_TRACE_PTR (PsDeleteParseTree, SubtreeRoot); + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE_TREES, + " root %p\n", SubtreeRoot)); /* Visit all nodes in the subtree */ while (Op) { - /* Check if we are not ascending */ - if (Op != Parent) { + /* This is the descending case */ + + if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_PARSE_TREES, _COMPONENT)) + { + /* This debug option will print the entire parse tree */ + + AcpiOsPrintf (" %*.s%s %p", (Level * 4), " ", + AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Op); + + if (Op->Named.AmlOpcode == AML_INT_NAMEPATH_OP) + { + AcpiOsPrintf (" %4.4s", Op->Common.Value.String); + } + if (Op->Named.AmlOpcode == AML_STRING_OP) + { + AcpiOsPrintf (" %s", Op->Common.Value.String); + } + AcpiOsPrintf ("\n"); + } + /* Look for an argument or child of the current op */ Next = AcpiPsGetArg (Op, 0); @@ -197,6 +220,7 @@ AcpiPsDeleteParseTree ( /* Still going downward in tree (Op is not completed yet) */ Op = Next; + Level++; continue; } } @@ -221,6 +245,7 @@ AcpiPsDeleteParseTree ( } else { + Level--; Op = Parent; } } |
