MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / DebuggerProcessCommand

Function DebuggerProcessCommand

source/Debugger/Debug.cpp:9590–9642  ·  view source on GitHub ↗

Triggered when ENTER is pressed, or via script ===========================================================================

Source from the content-addressed store, hash-verified

9588// Triggered when ENTER is pressed, or via script
9589//===========================================================================
9590Update_t DebuggerProcessCommand ( const bool bEchoConsoleInput )
9591{
9592 Update_t bUpdateDisplay = UPDATE_NOTHING;
9593
9594 if (bEchoConsoleInput)
9595 ConsoleDisplayPush( ConsoleInputPeek() );
9596
9597 if (g_bAssemblerInput)
9598 {
9599 if (g_nConsoleInputChars)
9600 {
9601 ParseInput( g_pConsoleInput, false ); // Don't cook the args
9602 bUpdateDisplay |= _CmdAssemble( g_nAssemblerAddress, 0, g_nArgRaw );
9603 }
9604 else
9605 {
9606 AssemblerOff();
9607
9608 int nDelayedTargets = AssemblerDelayedTargetsSize();
9609 if (nDelayedTargets)
9610 {
9611 ConsoleDisplayPushFormat( " Asm: %d sym declared, not defined", nDelayedTargets );
9612 bUpdateDisplay |= UPDATE_CONSOLE_DISPLAY;
9613 }
9614 }
9615 ConsoleInputReset();
9616 bUpdateDisplay |= UPDATE_CONSOLE_DISPLAY | UPDATE_CONSOLE_INPUT;
9617 ConsoleUpdate(); // udpate console, don't pause
9618 }
9619 else
9620 if (g_nConsoleInputChars)
9621 {
9622 // BufferedInputPush(
9623 // Handle Buffered Input
9624 // while ( BufferedInputPeek() )
9625 int nArgs = ParseInput( g_pConsoleInput );
9626 if (nArgs == ARG_SYNTAX_ERROR)
9627 {
9628 bUpdateDisplay |= ConsoleDisplayErrorFormat( "Syntax error: %s", g_aArgs[0].sArg );
9629 }
9630 else
9631 {
9632 bUpdateDisplay |= ExecuteCommand( nArgs ); // ParseInput());
9633 }
9634
9635 if (!g_bConsoleBufferPaused)
9636 {
9637 ConsoleInputReset();
9638 }
9639 }
9640
9641 return bUpdateDisplay;
9642}
9643
9644void ToggleFullScreenConsole ()
9645{

Callers 4

ProcessClipboardCommandsFunction · 0.85
CmdSymbolsLoadFunction · 0.85
CmdOutputRunFunction · 0.85
DebuggerProcessKeyFunction · 0.85

Calls 11

ConsoleDisplayPushFunction · 0.85
ConsoleInputPeekFunction · 0.85
ParseInputFunction · 0.85
_CmdAssembleFunction · 0.85
AssemblerOffFunction · 0.85
ConsoleDisplayPushFormatFunction · 0.85
ConsoleInputResetFunction · 0.85
ExecuteCommandFunction · 0.85
ConsoleUpdateFunction · 0.70

Tested by

no test coverage detected