diff options
Diffstat (limited to 'source/compiler/aslxrefout.c')
-rw-r--r-- | source/compiler/aslxrefout.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/source/compiler/aslxrefout.c b/source/compiler/aslxrefout.c index 554f51fde0c5..701399cbaec4 100644 --- a/source/compiler/aslxrefout.c +++ b/source/compiler/aslxrefout.c @@ -252,7 +252,6 @@ OtXrefWalkPart1 ( MethodInfo->CurrentOp = Op; Node = Op->Asl.Node; - ParentPath = AcpiNsGetNormalizedPathname (Node, TRUE); /* Find all objects referenced by this method */ @@ -261,8 +260,11 @@ OtXrefWalkPart1 ( if (Status == AE_CTRL_TERMINATE) { + ParentPath = AcpiNsGetNormalizedPathname (Node, TRUE); + FlPrintFile (ASL_FILE_XREF_OUTPUT, " %-40s %s", ParentPath, AcpiUtGetTypeName (Node->Type)); + ACPI_FREE (ParentPath); switch (Node->Type) { @@ -324,12 +326,12 @@ OtXrefWalkPart1 ( } else { - ACPI_FREE (ParentPath); ParentPath = AcpiNsGetNormalizedPathname ( NextOp->Asl.Node, TRUE); FlPrintFile (ASL_FILE_XREF_OUTPUT, " (%.2u bit) in Buffer %s", Length, ParentPath); + ACPI_FREE (ParentPath); } break; @@ -339,13 +341,13 @@ OtXrefWalkPart1 ( FieldOp = NextOp->Asl.Parent; NextOp = FieldOp->Asl.Child; - ACPI_FREE (ParentPath); ParentPath = AcpiNsGetNormalizedPathname ( NextOp->Asl.Node, TRUE); FlPrintFile (ASL_FILE_XREF_OUTPUT, " (%.2u bit) in Region %s", (UINT32) Node->Op->Asl.Child->Asl.Value.Integer, ParentPath); + ACPI_FREE (ParentPath); if (FieldOp->Asl.ParseOpcode == PARSEOP_FIELD) { @@ -367,7 +369,6 @@ OtXrefWalkPart1 ( } FlPrintFile (ASL_FILE_XREF_OUTPUT, "\n"); - ACPI_FREE (ParentPath); } break; @@ -672,6 +673,7 @@ OtXrefWalkPart3 ( "\n[%5u] %-40s %s Declaration\n", Op->Asl.LogicalLineNumber, ParentPath, AcpiUtGetTypeName (Node->Type)); + ACPI_FREE (ParentPath); XrefInfo->MethodOp = Op; XrefInfo->ThisObjectReferences = 0; @@ -716,7 +718,7 @@ OtXrefAnalysisWalkPart3 ( void *Context) { ASL_XREF_INFO *XrefInfo = (ASL_XREF_INFO *) Context; - char *CallerFullPathname; + char *CallerFullPathname = NULL; ACPI_PARSE_OBJECT *CallerOp; const char *Operator; @@ -756,27 +758,24 @@ OtXrefAnalysisWalkPart3 ( CallerOp = CallerOp->Asl.Parent; } - /* There are some special cases for the oddball operators */ + if (CallerOp == XrefInfo->CurrentMethodOp) + { + return (AE_OK); + } + + /* Null CallerOp means the caller is at the namespace root */ if (CallerOp) { CallerFullPathname = AcpiNsGetNormalizedPathname ( CallerOp->Asl.Node, TRUE); } - else - { - CallerFullPathname = "<root>"; - } - if (CallerOp == XrefInfo->CurrentMethodOp) - { - return (AE_OK); - } + /* There are some special cases for the oddball operators */ if (Op->Asl.ParseOpcode == PARSEOP_SCOPE) { Operator = "Scope"; - } else if (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_ALIAS) { @@ -794,7 +793,7 @@ OtXrefAnalysisWalkPart3 ( FlPrintFile (ASL_FILE_XREF_OUTPUT, "[%5u] %-40s %-8s via path: %s, Operator: %s\n", Op->Asl.LogicalLineNumber, - CallerFullPathname, + CallerFullPathname ? CallerFullPathname : "<root>", Operator, Op->Asl.ExternalName, Op->Asl.Parent->Asl.ParseOpName); @@ -804,6 +803,11 @@ OtXrefAnalysisWalkPart3 ( CallerOp = ACPI_TO_POINTER (0xFFFFFFFF); } + if (CallerFullPathname) + { + ACPI_FREE (CallerFullPathname); + } + XrefInfo->CurrentMethodOp = CallerOp; XrefInfo->ThisObjectReferences++; return (AE_OK); |