diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-08-31 21:40:51 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-08-31 21:40:51 +0000 |
| commit | be99e84498e91a5930864ef7b92b1a7ceb815e44 (patch) | |
| tree | 7f5a2883a75b1713bdfe7d36ffa6217bac9187e2 /source/components/debugger/dbexec.c | |
| parent | 8bc6ab62dbdb3e8b0d2253e0440f6f58ac9afd3d (diff) | |
Notes
Diffstat (limited to 'source/components/debugger/dbexec.c')
| -rw-r--r-- | source/components/debugger/dbexec.c | 65 |
1 files changed, 36 insertions, 29 deletions
diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index b3c6cf9fab98..fcb9b8386329 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -444,44 +444,51 @@ AcpiDbExecute ( ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL); return; } - else + + NameString = ACPI_ALLOCATE (strlen (Name) + 1); + if (!NameString) { - NameString = ACPI_ALLOCATE (strlen (Name) + 1); - if (!NameString) - { - return; - } + return; + } - memset (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO)); + memset (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO)); + strcpy (NameString, Name); + AcpiUtStrupr (NameString); - strcpy (NameString, Name); - AcpiUtStrupr (NameString); - AcpiGbl_DbMethodInfo.Name = NameString; - AcpiGbl_DbMethodInfo.Args = Args; - AcpiGbl_DbMethodInfo.Types = Types; - AcpiGbl_DbMethodInfo.Flags = Flags; + /* Subcommand to Execute all predefined names in the namespace */ - ReturnObj.Pointer = NULL; - ReturnObj.Length = ACPI_ALLOCATE_BUFFER; + if (!strncmp (NameString, "PREDEF", 6)) + { + AcpiDbEvaluatePredefinedNames (); + ACPI_FREE (NameString); + return; + } - Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo); - if (ACPI_FAILURE (Status)) - { - ACPI_FREE (NameString); - return; - } + AcpiGbl_DbMethodInfo.Name = NameString; + AcpiGbl_DbMethodInfo.Args = Args; + AcpiGbl_DbMethodInfo.Types = Types; + AcpiGbl_DbMethodInfo.Flags = Flags; - /* Get the NS node, determines existence also */ + ReturnObj.Pointer = NULL; + ReturnObj.Length = ACPI_ALLOCATE_BUFFER; - Status = AcpiGetHandle (NULL, AcpiGbl_DbMethodInfo.Pathname, - &AcpiGbl_DbMethodInfo.Method); - if (ACPI_SUCCESS (Status)) - { - Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, - &ReturnObj); - } + Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo); + if (ACPI_FAILURE (Status)) + { ACPI_FREE (NameString); + return; + } + + /* Get the NS node, determines existence also */ + + Status = AcpiGetHandle (NULL, AcpiGbl_DbMethodInfo.Pathname, + &AcpiGbl_DbMethodInfo.Method); + if (ACPI_SUCCESS (Status)) + { + Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, + &ReturnObj); } + ACPI_FREE (NameString); /* * Allow any handlers in separate threads to complete. |
