From 04815cb49b112f15d22b32032ea024818f6a10a7 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Thu, 23 Mar 2023 19:28:59 -0500 Subject: [PATCH] bugfix: debugging broke when using multi-pointers --- compiler/src/wasm_output.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/src/wasm_output.h b/compiler/src/wasm_output.h index 2692febb..2500b343 100644 --- a/compiler/src/wasm_output.h +++ b/compiler/src/wasm_output.h @@ -940,6 +940,14 @@ static i32 output_ovm_debug_sections(OnyxWasmModule* module, bh_buffer* buff) { continue; } + // In the debug info, multi-pointers are just pointers. + if (type->kind == Type_Kind_MultiPointer) { + output_unsigned_integer(2, §ion_buff); + output_unsigned_integer(1, §ion_buff); + output_unsigned_integer(type->Pointer.elem->id, §ion_buff); + continue; + } + if (type->kind == Type_Kind_Enum) { output_unsigned_integer(8, §ion_buff); output_unsigned_integer(type->Enum.backing->id, §ion_buff); -- 2.25.1