diff options
Diffstat (limited to 'source/components/debugger/dbexec.c')
| -rw-r--r-- | source/components/debugger/dbexec.c | 62 | 
1 files changed, 39 insertions, 23 deletions
| diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index 433cc55c3b73..ebd02b7c8927 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -46,7 +46,6 @@  #include "acdebug.h"  #include "acnamesp.h" -#ifdef ACPI_DEBUGGER  #define _COMPONENT          ACPI_CA_DEBUGGER          ACPI_MODULE_NAME    ("dbexec") @@ -213,7 +212,8 @@ AcpiDbExecuteMethod (          if (Status == AE_BUFFER_OVERFLOW)          {              ACPI_ERROR ((AE_INFO, -                "Possible overflow of internal debugger buffer (size 0x%X needed 0x%X)", +                "Possible overflow of internal debugger " +                "buffer (size 0x%X needed 0x%X)",                  ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));          }      } @@ -380,10 +380,11 @@ AcpiDbExecutionWalk (      Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj); -    AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n", AcpiUtGetNodeName (Node), -            AcpiFormatException (Status)); -    AcpiGbl_MethodExecuting = FALSE; +    AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n", +        AcpiUtGetNodeName (Node), +        AcpiFormatException (Status)); +    AcpiGbl_MethodExecuting = FALSE;      return (AE_OK);  } @@ -394,6 +395,7 @@ AcpiDbExecutionWalk (   *   * PARAMETERS:  Name                - Name of method to execute   *              Args                - Parameters to the method + *              Types               -   *              Flags               - single step/no single step   *   * RETURN:      None @@ -414,7 +416,6 @@ AcpiDbExecute (      ACPI_BUFFER             ReturnObj;      char                    *NameString; -  #ifdef ACPI_DEBUG_OUTPUT      UINT32                  PreviousAllocations;      UINT32                  Allocations; @@ -428,7 +429,7 @@ AcpiDbExecute (      if (*Name == '*')      {          (void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT, -                    ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL); +            ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL);          return;      }      else @@ -464,7 +465,8 @@ AcpiDbExecute (              &AcpiGbl_DbMethodInfo.Method);          if (ACPI_SUCCESS (Status))          { -            Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj); +            Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, +                &ReturnObj);          }          ACPI_FREE (NameString);      } @@ -485,15 +487,17 @@ AcpiDbExecute (      if (Allocations > 0)      { -        AcpiOsPrintf ("0x%X Outstanding allocations after evaluation of %s\n", -                        Allocations, AcpiGbl_DbMethodInfo.Pathname); +        AcpiOsPrintf ( +            "0x%X Outstanding allocations after evaluation of %s\n", +            Allocations, AcpiGbl_DbMethodInfo.Pathname);      }  #endif      if (ACPI_FAILURE (Status))      {          AcpiOsPrintf ("Evaluation of %s failed with status %s\n", -            AcpiGbl_DbMethodInfo.Pathname, AcpiFormatException (Status)); +            AcpiGbl_DbMethodInfo.Pathname, +            AcpiFormatException (Status));      }      else      { @@ -502,15 +506,18 @@ AcpiDbExecute (          if (ReturnObj.Length)          {              AcpiOsPrintf ( -                "Evaluation of %s returned object %p, external buffer length %X\n", +                "Evaluation of %s returned object %p, " +                "external buffer length %X\n",                  AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,                  (UINT32) ReturnObj.Length); +              AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);              /* Dump a _PLD buffer if present */              if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, -                    AcpiGbl_DbMethodInfo.Method)->Name.Ascii), METHOD_NAME__PLD)) +                    AcpiGbl_DbMethodInfo.Method)->Name.Ascii), +                    METHOD_NAME__PLD))              {                  AcpiDbDumpPldBuffer (ReturnObj.Pointer);              } @@ -563,8 +570,10 @@ AcpiDbMethodThread (      if (Info->InitArgs)      { -        AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr); -        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr); +        AcpiDbUint32ToHexString (Info->NumCreated, +            Info->IndexOfThreadStr); +        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), +            Info->IdOfThreadStr);      }      if (Info->Threads && (Info->NumCreated < Info->NumThreads)) @@ -599,7 +608,8 @@ AcpiDbMethodThread (  #if 0          if ((i % 100) == 0)          { -            AcpiOsPrintf ("%u loops, Thread 0x%x\n", i, AcpiOsGetThreadId ()); +            AcpiOsPrintf ("%u loops, Thread 0x%x\n", +                i, AcpiOsGetThreadId ());          }          if (ReturnObj.Length) @@ -614,7 +624,8 @@ AcpiDbMethodThread (      /* Signal our completion */      Allow = 0; -    (void) AcpiOsWaitSemaphore (Info->ThreadCompleteGate, 1, ACPI_WAIT_FOREVER); +    (void) AcpiOsWaitSemaphore (Info->ThreadCompleteGate, +        1, ACPI_WAIT_FOREVER);      Info->NumCompleted++;      if (Info->NumCompleted == Info->NumThreads) @@ -630,7 +641,8 @@ AcpiDbMethodThread (          Status = AcpiOsSignalSemaphore (Info->MainThreadGate, 1);          if (ACPI_FAILURE (Status))          { -            AcpiOsPrintf ("Could not signal debugger thread sync semaphore, %s\n", +            AcpiOsPrintf ( +                "Could not signal debugger thread sync semaphore, %s\n",                  AcpiFormatException (Status));          }      } @@ -686,7 +698,8 @@ AcpiDbCreateExecutionThreads (      Status = AcpiOsCreateSemaphore (1, 0, &MainThreadGate);      if (ACPI_FAILURE (Status))      { -        AcpiOsPrintf ("Could not create semaphore for synchronization with the main thread, %s\n", +        AcpiOsPrintf ("Could not create semaphore for " +            "synchronization with the main thread, %s\n",              AcpiFormatException (Status));          return;      } @@ -698,8 +711,10 @@ AcpiDbCreateExecutionThreads (      Status = AcpiOsCreateSemaphore (1, 1, &ThreadCompleteGate);      if (ACPI_FAILURE (Status))      { -        AcpiOsPrintf ("Could not create semaphore for synchronization between the created threads, %s\n", +        AcpiOsPrintf ("Could not create semaphore for " +            "synchronization between the created threads, %s\n",              AcpiFormatException (Status)); +          (void) AcpiOsDeleteSemaphore (MainThreadGate);          return;      } @@ -707,8 +722,10 @@ AcpiDbCreateExecutionThreads (      Status = AcpiOsCreateSemaphore (1, 1, &InfoGate);      if (ACPI_FAILURE (Status))      { -        AcpiOsPrintf ("Could not create semaphore for synchronization of AcpiGbl_DbMethodInfo, %s\n", +        AcpiOsPrintf ("Could not create semaphore for " +            "synchronization of AcpiGbl_DbMethodInfo, %s\n",              AcpiFormatException (Status)); +          (void) AcpiOsDeleteSemaphore (ThreadCompleteGate);          (void) AcpiOsDeleteSemaphore (MainThreadGate);          return; @@ -720,6 +737,7 @@ AcpiDbCreateExecutionThreads (      AcpiGbl_DbMethodInfo.NumThreads = NumThreads;      Size = sizeof (ACPI_THREAD_ID) * AcpiGbl_DbMethodInfo.NumThreads; +      AcpiGbl_DbMethodInfo.Threads = AcpiOsAllocate (Size);      if (AcpiGbl_DbMethodInfo.Threads == NULL)      { @@ -807,5 +825,3 @@ CleanupAndExit:      AcpiOsFree (AcpiGbl_DbMethodInfo.Threads);      AcpiGbl_DbMethodInfo.Threads = NULL;  } - -#endif /* ACPI_DEBUGGER */ | 
