int Semihost_IsDebuggeeMakingSemihostCall(void) { PlatformInstructionType instructionType = Platform_TypeOfCurrentInstruction(); return (instructionType == MRI_PLATFORM_INSTRUCTION_MBED_SEMIHOST_CALL || instructionType == MRI_PLATFORM_INSTRUCTION_NEWLIB_SEMIHOST_CALL); }
int Semihost_HandleSemihostRequest(void) { PlatformInstructionType instructionType = Platform_TypeOfCurrentInstruction(); PlatformSemihostParameters parameters = Platform_GetSemihostCallParameters(); if (instructionType == MRI_PLATFORM_INSTRUCTION_MBED_SEMIHOST_CALL) return Semihost_HandleMbedSemihostRequest(¶meters); else if (instructionType == MRI_PLATFORM_INSTRUCTION_NEWLIB_SEMIHOST_CALL) return Semihost_HandleNewlibSemihostRequest(¶meters); else return 0; }
static int isCurrentInstructionHardcodedBreakpoint(void) { return Platform_TypeOfCurrentInstruction() == MRI_PLATFORM_INSTRUCTION_HARDCODED_BREAKPOINT; }