[Lldb-commits] [lldb] 0818e6c - [LLDB] Add support for AVR breakpoints
Ayke van Laethem via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 17 05:19:29 PDT 2020
Author: Ayke van Laethem
Date: 2020-03-17T13:17:48+01:00
New Revision: 0818e6cf1d30dcac1fc4dcde60e01f8389e725f9
URL: https://github.com/llvm/llvm-project/commit/0818e6cf1d30dcac1fc4dcde60e01f8389e725f9
DIFF: https://github.com/llvm/llvm-project/commit/0818e6cf1d30dcac1fc4dcde60e01f8389e725f9.diff
LOG: [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
Added:
Modified:
lldb/source/Target/Platform.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index eaa71b9cbbd0..3069a363736f 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -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};
More information about the lldb-commits
mailing list