diff options
-rw-r--r-- | source/components/debugger/dbinput.c | 4 | ||||
-rw-r--r-- | source/components/debugger/dbxface.c | 14 | ||||
-rw-r--r-- | source/components/utilities/utxface.c | 8 | ||||
-rw-r--r-- | source/components/utilities/utxfinit.c | 11 | ||||
-rw-r--r-- | source/include/acdebug.h | 8 | ||||
-rw-r--r-- | source/include/acpixf.h | 8 | ||||
-rw-r--r-- | source/tools/acpiexec/aemain.c | 16 |
7 files changed, 37 insertions, 32 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 45f8c565a..d1389b93e 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -1399,6 +1399,10 @@ AcpiDbUserCommands ( } } + /* Shut down the debugger */ + + AcpiTerminateDebugger (); + /* * Only this thread (the original thread) should actually terminate the * subsystem, because all the semaphores are deleted during termination diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c index 5aba4713a..6cd1bb1de 100644 --- a/source/components/debugger/dbxface.c +++ b/source/components/debugger/dbxface.c @@ -473,7 +473,7 @@ AcpiDbSingleStep ( /******************************************************************************* * - * FUNCTION: AcpiDbInitialize + * FUNCTION: AcpiInitializeDebugger * * PARAMETERS: None * @@ -484,13 +484,13 @@ AcpiDbSingleStep ( ******************************************************************************/ ACPI_STATUS -AcpiDbInitialize ( +AcpiInitializeDebugger ( void) { ACPI_STATUS Status; - ACPI_FUNCTION_TRACE (DbInitialize); + ACPI_FUNCTION_TRACE (AcpiInitializeDebugger); /* Init globals */ @@ -558,10 +558,12 @@ AcpiDbInitialize ( return_ACPI_STATUS (AE_OK); } +ACPI_EXPORT_SYMBOL (AcpiInitializeDebugger) + /******************************************************************************* * - * FUNCTION: AcpiDbTerminate + * FUNCTION: AcpiTerminateDebugger * * PARAMETERS: None * @@ -572,7 +574,7 @@ AcpiDbInitialize ( ******************************************************************************/ void -AcpiDbTerminate ( +AcpiTerminateDebugger ( void) { @@ -587,6 +589,8 @@ AcpiDbTerminate ( AcpiGbl_DbOutputFlags = ACPI_DB_DISABLE_OUTPUT; } +ACPI_EXPORT_SYMBOL (AcpiTerminateDebugger) + #ifdef ACPI_OBSOLETE_FUNCTIONS /******************************************************************************* diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index a68c8eec7..a34970e9b 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -171,14 +171,6 @@ AcpiTerminate ( AcpiUtMutexTerminate (); - -#ifdef ACPI_DEBUGGER - - /* Shut down the debugger */ - - AcpiDbTerminate (); -#endif - /* Now we can shutdown the OS-dependent layer */ Status = AcpiOsTerminate (); diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index 0d3cfdd21..4703dc18c 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -204,17 +204,6 @@ AcpiInitializeSubsystem ( return_ACPI_STATUS (Status); } - /* If configured, initialize the AML debugger */ - -#ifdef ACPI_DEBUGGER - Status = AcpiDbInitialize (); - if (ACPI_FAILURE (Status)) - { - ACPI_EXCEPTION ((AE_INFO, Status, "During Debugger initialization")); - return_ACPI_STATUS (Status); - } -#endif - return_ACPI_STATUS (AE_OK); } diff --git a/source/include/acdebug.h b/source/include/acdebug.h index 909c8319c..156660f22 100644 --- a/source/include/acdebug.h +++ b/source/include/acdebug.h @@ -161,14 +161,6 @@ typedef struct acpi_db_execute_walk * dbxface - external debugger interfaces */ ACPI_STATUS -AcpiDbInitialize ( - void); - -void -AcpiDbTerminate ( - void); - -ACPI_STATUS AcpiDbSingleStep ( ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op, diff --git a/source/include/acpixf.h b/source/include/acpixf.h index 791aa646e..53b740160 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -1280,4 +1280,12 @@ AcpiLogError ( const char *Format, ...)) +ACPI_STATUS +AcpiInitializeDebugger ( + void); + +void +AcpiTerminateDebugger ( + void); + #endif /* __ACXFACE_H__ */ diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c index bbab2f5de..1799953be 100644 --- a/source/tools/acpiexec/aemain.c +++ b/source/tools/acpiexec/aemain.c @@ -546,6 +546,15 @@ main ( AcpiGbl_MaxLoopIterations = 400; + /* Initialize the AML debugger */ + + Status = AcpiInitializeDebugger (); + AE_CHECK_OK (AcpiInitializeDebugger, Status); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; + } + printf (ACPI_COMMON_SIGNON (ACPIEXEC_NAME)); if (argc < 2) { @@ -715,6 +724,10 @@ EnterDebugger: case AE_MODE_BATCH_SINGLE: AcpiDbExecute (BatchBuffer, NULL, NULL, EX_NO_SINGLE_STEP); + + /* Shut down the debugger */ + + AcpiTerminateDebugger (); Status = AcpiTerminate (); break; } @@ -779,6 +792,9 @@ AcpiDbRunBatchMode ( } } + /* Shut down the debugger */ + + AcpiTerminateDebugger (); Status = AcpiTerminate (); return (Status); } |