diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-11-25 21:04:42 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-11-25 21:04:42 +0000 |
commit | b9098066cd6284319bca922f13e59517f774a103 (patch) | |
tree | f01fd6c9053cb01ed84c00cb42ee789adafceaf5 /source/components/debugger/dbinput.c | |
parent | 1e24cf365bc9c8df179b145c90d52852724e54ee (diff) |
Notes
Diffstat (limited to 'source/components/debugger/dbinput.c')
-rw-r--r-- | source/components/debugger/dbinput.c | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 1b9a9175e294..68043cbed6f8 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -45,6 +45,9 @@ #include "accommon.h" #include "acdebug.h" +#ifdef ACPI_APPLICATION +#include "acapps.h" +#endif #define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbinput") @@ -679,10 +682,7 @@ AcpiDbGetLine ( /* Uppercase the actual command */ - if (AcpiGbl_DbArgs[0]) - { - AcpiUtStrupr (AcpiGbl_DbArgs[0]); - } + AcpiUtStrupr (AcpiGbl_DbArgs[0]); Count = i; if (Count) @@ -762,7 +762,7 @@ AcpiDbCommandDispatch ( /* If AcpiTerminate has been called, terminate this thread */ - if (AcpiGbl_DbTerminateThreads) + if (AcpiGbl_DbTerminateLoop) { return (AE_CTRL_TERMINATE); } @@ -942,8 +942,8 @@ AcpiDbCommandDispatch ( else if (ParamCount == 2) { Temp = AcpiGbl_DbConsoleDebugLevel; - AcpiGbl_DbConsoleDebugLevel = strtoul (AcpiGbl_DbArgs[1], - NULL, 16); + AcpiGbl_DbConsoleDebugLevel = + strtoul (AcpiGbl_DbArgs[1], NULL, 16); AcpiOsPrintf ( "Debug Level for console output was %8.8lX, now %8.8lX\n", Temp, AcpiGbl_DbConsoleDebugLevel); @@ -1119,8 +1119,16 @@ AcpiDbCommandDispatch ( break; case CMD_LOAD: + { + ACPI_NEW_TABLE_DESC *ListHead = NULL; - Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE); + Status = AcpiAcGetAllTablesFromFile (AcpiGbl_DbArgs[1], + ACPI_GET_ALL_TABLES, &ListHead); + if (ACPI_SUCCESS (Status)) + { + AcpiDbLoadTables (ListHead); + } + } break; case CMD_OPEN: @@ -1140,6 +1148,7 @@ AcpiDbCommandDispatch ( * re-creating the semaphores! */ + AcpiGbl_DbTerminateLoop = TRUE; /* AcpiInitialize (NULL); */ break; @@ -1184,7 +1193,7 @@ AcpiDbCommandDispatch ( #ifdef ACPI_APPLICATION AcpiDbCloseDebugFile (); #endif - AcpiGbl_DbTerminateThreads = TRUE; + AcpiGbl_DbTerminateLoop = TRUE; return (AE_CTRL_TERMINATE); case CMD_NOT_FOUND: @@ -1224,7 +1233,7 @@ AcpiDbExecuteThread ( ACPI_STATUS MStatus; - while (Status != AE_CTRL_TERMINATE) + while (Status != AE_CTRL_TERMINATE && !AcpiGbl_DbTerminateLoop) { AcpiGbl_MethodExecuting = FALSE; AcpiGbl_StepToNextCall = FALSE; @@ -1240,6 +1249,7 @@ AcpiDbExecuteThread ( AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete); } + AcpiGbl_DbThreadsTerminated = TRUE; } @@ -1294,7 +1304,7 @@ AcpiDbUserCommands ( /* TBD: [Restructure] Need a separate command line buffer for step mode */ - while (!AcpiGbl_DbTerminateThreads) + while (!AcpiGbl_DbTerminateLoop) { /* Force output to console until a command is entered */ @@ -1330,10 +1340,6 @@ AcpiDbUserCommands ( * and wait for the command to complete. */ AcpiOsReleaseMutex (AcpiGbl_DbCommandReady); - if (ACPI_FAILURE (Status)) - { - return (Status); - } Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete, ACPI_WAIT_FOREVER); @@ -1350,14 +1356,5 @@ 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 - */ - Status = AcpiTerminate (); return (Status); } |