/* Handle the 'C' command which is sent from gdb to tell the debugger to continue execution of the currently halted program. It is similar to the 'c' command but it also provides a signal level, which MRI ignores. Command Format: cAA;BBBBBBBB Response Format: Blank until the next exception, at which time a 'T' stop response packet will be sent. Where AA is the signal to be set, and BBBBBBBB is an optional value to be used for the Program Counter when restarting the program. */ uint32_t HandleContinueWithSignalCommand(void) { Buffer* pBuffer = GetBuffer(); uint32_t returnValue = 0; uint32_t newPC; returnValue |= skipHardcodedBreakpoint(); __try { /* Fetch signal value but ignore it. */ __throwing_func( ReadUIntegerArgument(pBuffer) ); if (Buffer_BytesLeft(pBuffer) && Buffer_IsNextCharEqualTo(pBuffer, ';')) { __throwing_func( newPC = ReadUIntegerArgument(pBuffer) ); Platform_SetProgramCounter(newPC); } } __catch { PrepareStringResponse(MRI_ERROR_INVALID_ARGUMENT); return 0; } return (returnValue | HANDLER_RETURN_RESUME_PROGRAM | HANDLER_RETURN_RETURN_IMMEDIATELY); }
static void parseBreakpointWatchpointCommandArguments(BreakpointWatchpointArguments* pArguments) { Buffer* pBuffer = GetBuffer(); __try { __throwing_func( pArguments->type = Buffer_ReadChar(pBuffer) ); __throwing_func( ThrowIfNextCharIsNotEqualTo(pBuffer, ',') ); __throwing_func( pArguments->address = ReadUIntegerArgument(pBuffer) ); __throwing_func( ThrowIfNextCharIsNotEqualTo(pBuffer, ',') ); __throwing_func( pArguments->kind = ReadUIntegerArgument(pBuffer) ); } __catch { __rethrow; } }
/* Handle the 'c' command which is sent from gdb to tell the debugger to continue execution of the currently halted program. Command Format: cAAAAAAAA Response Format: Blank until the next exception, at which time a 'T' stop response packet will be sent. Where AAAAAAAA is an optional value to be used for the Program Counter when restarting the program. */ uint32_t HandleContinueCommand(void) { Buffer* pBuffer = GetBuffer(); uint32_t returnValue = 0; uint32_t newPC; returnValue |= skipHardcodedBreakpoint(); /* New program counter value is optional parameter. */ __try { __throwing_func( newPC = ReadUIntegerArgument(pBuffer) ); Platform_SetProgramCounter(newPC); } __catch { clearExceptionCode(); } return (returnValue | HANDLER_RETURN_RESUME_PROGRAM | HANDLER_RETURN_RETURN_IMMEDIATELY); }