From: Brendan Hansen Date: Fri, 24 Mar 2023 00:28:59 +0000 (-0500) Subject: bugfix: debugging broke when using multi-pointers X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature%2Fmulti-pointers;p=onyx.git bugfix: debugging broke when using multi-pointers --- 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);