aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/Platform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r--lldb/source/Target/Platform.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 8000cd0..e9d9c8f 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -2076,6 +2076,13 @@ size_t Platform::GetSoftwareBreakpointTrapOpcode(Target &target,
trap_opcode_size = sizeof(g_loongarch_opcode);
} break;
+ case llvm::Triple::wasm32: {
+ // Unreachable (0x00) triggers an unconditional trap.
+ static const uint8_t g_wasm_opcode[] = {0x00};
+ trap_opcode = g_wasm_opcode;
+ trap_opcode_size = sizeof(g_wasm_opcode);
+ } break;
+
default:
return 0;
}