Local change: Put various debugging options under ACPI_DISASSEMBLER.
Approved by: njl MFC after: 1 week
This commit is contained in:
parent
6a7971435d
commit
64092a1d81
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbcmds - debug commands and output routines
|
||||
* $Revision: 113 $
|
||||
* $Revision: 115 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -124,6 +124,9 @@
|
||||
#include "acresrc.h"
|
||||
#include "acdisasm.h"
|
||||
|
||||
|
||||
#include "acparser.h"
|
||||
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
#define _COMPONENT ACPI_CA_DEBUGGER
|
||||
@ -157,6 +160,18 @@ static ARGUMENT_INFO AcpiDbObjectTypes [] =
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbSleep
|
||||
*
|
||||
* PARAMETERS: ObjectArg - Desired sleep state (0-5)
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Simulate a sleep/wake sequence
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbSleep (
|
||||
char *ObjectArg)
|
||||
@ -505,6 +520,71 @@ AcpiDbDisassembleAml (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbDisassembleMethod
|
||||
*
|
||||
* PARAMETERS: Method - Name of control method
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Display disassembled AML (ASL) starting from Op for the number
|
||||
* of statements specified.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisassembleMethod (
|
||||
char *Name)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
ACPI_WALK_STATE *WalkState;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_NAMESPACE_NODE *Method;
|
||||
|
||||
|
||||
Method = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ACPI_STRTOUL (Name, NULL, 16));
|
||||
if (!Method)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
ObjDesc = Method->Object;
|
||||
|
||||
Op = AcpiPsCreateScopeOp ();
|
||||
if (!Op)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Create and initialize a new walk state */
|
||||
|
||||
WalkState = AcpiDsCreateWalkState (0, Op, NULL, NULL);
|
||||
if (!WalkState)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
|
||||
ObjDesc->Method.AmlStart,
|
||||
ObjDesc->Method.AmlLength, NULL, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* Parse the AML */
|
||||
|
||||
WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
|
||||
Status = AcpiPsParseAml (WalkState);
|
||||
|
||||
AcpiDmDisassemble (NULL, Op, 0);
|
||||
AcpiPsDeleteParseTree (Op);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbDumpNamespace
|
||||
@ -838,6 +918,8 @@ AcpiDbWalkForSpecificObjects (
|
||||
|
||||
if (ObjDesc)
|
||||
{
|
||||
AcpiOsPrintf (" %p/%p", ObjHandle, ObjDesc);
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
Loading…
Reference in New Issue
Block a user