[LLDB] Add support for AVR breakpoints

I believe the actual opcode does not matter because the AVR architecture
is a Harvard architecture that does not support writing to program
memory. Therefore, debuggers and emulators provide hardware breakpoints.
But for some reason, this opcode must be defined or else LLDB will crash
with an assertion error.

Differential Revision: https://reviews.llvm.org/D74255
This commit is contained in:
Ayke van Laethem 2020-02-07 22:39:56 +01:00
parent 1d6f919df2
commit 0818e6cf1d
No known key found for this signature in database
GPG Key ID: E97FF5335DFDFDED
1 changed files with 6 additions and 0 deletions

View File

@ -1865,6 +1865,12 @@ size_t Platform::GetSoftwareBreakpointTrapOpcode(Target &target,
}
} break;
case llvm::Triple::avr: {
static const uint8_t g_hex_opcode[] = {0x98, 0x95};
trap_opcode = g_hex_opcode;
trap_opcode_size = sizeof(g_hex_opcode);
} break;
case llvm::Triple::mips:
case llvm::Triple::mips64: {
static const uint8_t g_hex_opcode[] = {0x00, 0x00, 0x00, 0x0d};