Print this page
acpica-unix2-20130823
PANKOVs restructure

@@ -3,11 +3,11 @@
  * Module Name: dbutils - AML debugger utilities
  *
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

@@ -83,11 +83,11 @@
  ******************************************************************************/
 
 ACPI_OBJECT_TYPE
 AcpiDbMatchArgument (
     char                    *UserArgument,
-    ARGUMENT_INFO           *Arguments)
+    ACPI_DB_ARGUMENT_INFO   *Arguments)
 {
     UINT32                  i;
 
 
     if (!UserArgument || UserArgument[0] == 0)

@@ -177,48 +177,41 @@
     case ACPI_TYPE_ANY:
 
         AcpiOsPrintf ("[Null Object] (Type=0)\n");
         break;
 
-
     case ACPI_TYPE_INTEGER:
 
         AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
                     ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
         break;
 
-
     case ACPI_TYPE_STRING:
 
         AcpiOsPrintf ("[String] Length %.2X = ", ObjDesc->String.Length);
-        for (i = 0; i < ObjDesc->String.Length; i++)
-        {
-            AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
-        }
+        AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
         AcpiOsPrintf ("\n");
         break;
 
-
     case ACPI_TYPE_BUFFER:
 
         AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
         if (ObjDesc->Buffer.Length)
         {
             if (ObjDesc->Buffer.Length > 16)
             {
                 AcpiOsPrintf ("\n");
             }
-            AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
-                    ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
+            AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
+                    ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
         }
         else
         {
             AcpiOsPrintf ("\n");
         }
         break;
 
-
     case ACPI_TYPE_PACKAGE:
 
         AcpiOsPrintf ("[Package] Contains %u Elements:\n",
                 ObjDesc->Package.Count);
 

@@ -226,30 +219,26 @@
         {
             AcpiDbDumpExternalObject (&ObjDesc->Package.Elements[i], Level+1);
         }
         break;
 
-
     case ACPI_TYPE_LOCAL_REFERENCE:
 
         AcpiOsPrintf ("[Object Reference] = ");
         AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
         break;
 
-
     case ACPI_TYPE_PROCESSOR:
 
         AcpiOsPrintf ("[Processor]\n");
         break;
 
-
     case ACPI_TYPE_POWER:
 
         AcpiOsPrintf ("[Power Resource]\n");
         break;
 
-
     default:
 
         AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Type);
         break;
     }

@@ -287,11 +276,11 @@
         *Name = '\\';
     }
 
     /* Ignore a leading backslash, this is the root prefix */
 
-    if (*Name == '\\')
+    if (ACPI_IS_ROOT_PREFIX (*Name))
     {
         Name++;
     }
 
     /* Convert all slash path separators to dots */

@@ -361,11 +350,11 @@
 }
 
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiDbUInt32ToHexString
+ * FUNCTION:    AcpiDbUint32ToHexString
  *
  * PARAMETERS:  Value           - The value to be converted to string
  *              Buffer          - Buffer for result (not less than 11 bytes)
  *
  * RETURN:      None

@@ -376,11 +365,11 @@
  *       is sufficient.
  *
  ******************************************************************************/
 
 void
-AcpiDbUInt32ToHexString (
+AcpiDbUint32ToHexString (
     UINT32                  Value,
     char                    *Buffer)
 {
     int                     i;
 

@@ -514,13 +503,11 @@
 {
 
     AcpiOsPrintf ("\nLocation %X:\n", Address);
 
     AcpiDbgLevel |= ACPI_LV_TABLES;
-    AcpiUtDumpBuffer (ACPI_TO_POINTER (Address), 64, DB_BYTE_DISPLAY,
+    AcpiUtDebugDumpBuffer (ACPI_TO_POINTER (Address), 64, DB_BYTE_DISPLAY,
             ACPI_UINT32_MAX);
 }
 #endif
 
 #endif /* ACPI_DEBUGGER */
-
-