FreeBSD/sys/contrib/dev/acpica/components/debugger/dbinput.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbUserCommands
 *
 * PARAMETERS:  Prompt              - User prompt (depends on mode)
 *              Op                  - Current executing parse op
 *
 * RETURN:      None
 *
 * DESCRIPTION: Command line execution for the AML debugger. Commands are
 *              matched and dispatched here.
 *
 ******************************************************************************/
AcpiDbUserCommands
PARAMETERS:  Prompt              - User prompt (depends on mode)
Op                  - Current executing parse op

None

Command line execution for the AML debugger. Commands are
matched and dispatched here.
AcpiDbUserCommands PARAMETERS : Prompt - User prompt ( depends on mode ) Op - Current executing parse op None Command line execution for the AML debugger . Commands are matched and dispatched here .
ACPI_STATUS
AcpiDbUserCommands (
    char                    Prompt,
    ACPI_PARSE_OBJECT       *Op)
{
    ACPI_STATUS             Status = AE_OK;
    AcpiOsPrintf ("\n");
    while (!AcpiGbl_DbTerminateLoop)
    {
        AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
        if (!AcpiGbl_MethodExecuting)
        {
            AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT);
        }
        else
        {
            AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT);
        }
        Status = AcpiOsGetLine (AcpiGbl_DbLineBuf,
            ACPI_DB_LINE_BUFFER_SIZE, NULL);
        if (ACPI_FAILURE (Status))
        {
            ACPI_EXCEPTION ((AE_INFO, Status, "While parsing command line"));
            return (Status);
        }
        if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
        {
            AcpiOsReleaseMutex (AcpiGbl_DbCommandReady);
            Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete,
                ACPI_WAIT_FOREVER);
            if (ACPI_FAILURE (Status))
            {
                return (Status);
            }
        }
        else
        {
            AcpiDbSingleThread ();
        }
    }
    return (Status);
}
ACPI_STATUS AcpiDbUserCommands ( char Prompt , ACPI_PARSE_OBJECT * Op ) { ACPI_STATUS Status = AE_OK ; AcpiOsPrintf ( " \n " ) ; while ( ! AcpiGbl_DbTerminateLoop ) { AcpiDbSetOutputDestination ( ACPI_DB_CONSOLE_OUTPUT ) ; if ( ! AcpiGbl_MethodExecuting ) { AcpiOsPrintf ( " " , ACPI_DEBUGGER_COMMAND_PROMPT ) ; } else { AcpiOsPrintf ( " " , ACPI_DEBUGGER_EXECUTE_PROMPT ) ; } Status = AcpiOsGetLine ( AcpiGbl_DbLineBuf , ACPI_DB_LINE_BUFFER_SIZE , NULL ) ; if ( ACPI_FAILURE ( Status ) ) { ACPI_EXCEPTION ( ( AE_INFO , Status , " " ) ) ; return ( Status ) ; } if ( AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED ) { AcpiOsReleaseMutex ( AcpiGbl_DbCommandReady ) ; Status = AcpiOsAcquireMutex ( AcpiGbl_DbCommandComplete , ACPI_WAIT_FOREVER ) ; if ( ACPI_FAILURE ( Status ) ) { return ( Status ) ; } } else { AcpiDbSingleThread ( ) ; } } return ( Status ) ; }
FUNCTION:    AcpiDbUserCommands
 PARAMETERS:  Prompt              - User prompt (depends on mode)
              Op                  - Current executing parse op
FUNCTION : AcpiDbUserCommands PARAMETERS : Prompt - User prompt ( depends on mode ) Op - Current executing parse op
/* TBD: [Restructure] Need a separate command line buffer for step mode */ /* Force output to console until a command is entered */ /* Different prompt if method is executing */ /* Get the user input line */ /* Check for single or multithreaded debug */ /*
             * Signal the debug thread that we have a command to execute,
             * and wait for the command to complete.
             */ /* Just call to the command line interpreter */