diff options
Diffstat (limited to 'sys/contrib/dev/acpica/dbxface.c')
-rw-r--r-- | sys/contrib/dev/acpica/dbxface.c | 110 |
1 files changed, 67 insertions, 43 deletions
diff --git a/sys/contrib/dev/acpica/dbxface.c b/sys/contrib/dev/acpica/dbxface.c index e4af083..053315d 100644 --- a/sys/contrib/dev/acpica/dbxface.c +++ b/sys/contrib/dev/acpica/dbxface.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbxface - AML Debugger external interfaces - * $Revision: 71 $ + * $Revision: 1.75 $ * ******************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. * All rights reserved. * * 2. License @@ -127,11 +127,26 @@ ACPI_MODULE_NAME ("dbxface") +/* Local prototypes */ + +static ACPI_STATUS +AcpiDbStartCommand ( + ACPI_WALK_STATE *WalkState, + ACPI_PARSE_OBJECT *Op); + +#ifdef ACPI_OBSOLETE_FUNCTIONS +void +AcpiDbMethodEnd ( + ACPI_WALK_STATE *WalkState); +#endif + + /******************************************************************************* * * FUNCTION: AcpiDbStartCommand * * PARAMETERS: WalkState - Current walk + * Op - Current executing Op, from AML interpreter * * RETURN: Status * @@ -139,7 +154,7 @@ * ******************************************************************************/ -ACPI_STATUS +static ACPI_STATUS AcpiDbStartCommand ( ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op) @@ -147,7 +162,7 @@ AcpiDbStartCommand ( ACPI_STATUS Status; - /* TBD: [Investigate] what are the namespace locking issues here */ + /* TBD: [Investigate] are there namespace locking issues here? */ /* AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); */ @@ -208,38 +223,10 @@ AcpiDbStartCommand ( /******************************************************************************* * - * FUNCTION: AcpiDbMethodEnd - * - * PARAMETERS: WalkState - Current walk - * - * RETURN: Status - * - * DESCRIPTION: - * - ******************************************************************************/ - -void -AcpiDbMethodEnd ( - ACPI_WALK_STATE *WalkState) -{ - - if (!AcpiGbl_CmSingleStep) - { - return; - } - - AcpiOsPrintf ("<Method Terminating>\n"); - - AcpiDbStartCommand (WalkState, NULL); -} - - -/******************************************************************************* - * * FUNCTION: AcpiDbSingleStep * * PARAMETERS: WalkState - Current walk - * Op - Current executing op + * Op - Current executing op (from aml interpreter) * OpcodeClass - Class of the current AML Opcode * * RETURN: Status @@ -291,7 +278,8 @@ AcpiDbSingleStep ( else if (WalkState->UserBreakpoint && (WalkState->UserBreakpoint == Op->Common.AmlOffset)) { - AcpiOsPrintf ("***UserBreakpoint*** at AML offset %X\n", Op->Common.AmlOffset); + AcpiOsPrintf ("***UserBreakpoint*** at AML offset %X\n", + Op->Common.AmlOffset); AcpiGbl_CmSingleStep = TRUE; AcpiGbl_StepToNextCall = FALSE; WalkState->MethodBreakpoint = 0; @@ -331,9 +319,9 @@ AcpiDbSingleStep ( } /* - * Display this op (and only this op - zero out the NEXT field temporarily, - * and disable parser trace output for the duration of the display because - * we don't want the extraneous debug output) + * Display this op (and only this op - zero out the NEXT field + * temporarily, and disable parser trace output for the duration of + * the display because we don't want the extraneous debug output) */ OriginalDebugLevel = AcpiDbgLevel; AcpiDbgLevel &= ~(ACPI_LV_PARSE | ACPI_LV_FUNCTIONS); @@ -346,7 +334,8 @@ AcpiDbSingleStep ( if (ParentOp) { if ((WalkState->ControlState) && - (WalkState->ControlState->Common.State == ACPI_CONTROL_PREDICATE_EXECUTING)) + (WalkState->ControlState->Common.State == + ACPI_CONTROL_PREDICATE_EXECUTING)) { /* * We are executing the predicate of an IF or WHILE statement @@ -446,10 +435,14 @@ AcpiDbSingleStep ( */ if (Op->Common.AmlOpcode == AML_INT_METHODCALL_OP) { - AcpiGbl_CmSingleStep = FALSE; /* No more single step while executing called method */ + /* Force no more single stepping while executing called method */ - /* Set the breakpoint on/before the call, it will stop execution as soon as we return */ + AcpiGbl_CmSingleStep = FALSE; + /* + * Set the breakpoint on/before the call, it will stop execution + * as soon as we return + */ WalkState->MethodBreakpoint = 1; /* Must be non-zero! */ } @@ -475,7 +468,8 @@ AcpiDbSingleStep ( ******************************************************************************/ ACPI_STATUS -AcpiDbInitialize (void) +AcpiDbInitialize ( + void) { ACPI_STATUS Status; @@ -558,14 +552,15 @@ AcpiDbInitialize (void) * * PARAMETERS: None * - * RETURN: Status + * RETURN: None * * DESCRIPTION: Stop debugger * ******************************************************************************/ void -AcpiDbTerminate (void) +AcpiDbTerminate ( + void) { if (AcpiGbl_DbTablePtr) @@ -579,4 +574,33 @@ AcpiDbTerminate (void) } +#ifdef ACPI_OBSOLETE_FUNCTIONS +/******************************************************************************* + * + * FUNCTION: AcpiDbMethodEnd + * + * PARAMETERS: WalkState - Current walk + * + * RETURN: Status + * + * DESCRIPTION: Called at method termination + * + ******************************************************************************/ + +void +AcpiDbMethodEnd ( + ACPI_WALK_STATE *WalkState) +{ + + if (!AcpiGbl_CmSingleStep) + { + return; + } + + AcpiOsPrintf ("<Method Terminating>\n"); + + AcpiDbStartCommand (WalkState, NULL); +} +#endif + #endif /* ACPI_DEBUGGER */ |