+ generate DWARF debug info for WebAssembly locals

This commit is contained in:
Nikolay Nikolov 2024-01-08 01:18:06 +02:00
parent 3edd92dab1
commit fbcd90f286

View File

@ -2422,6 +2422,15 @@ implementation
templist.concat(tai_const.create_sleb128bit(sym.localloc.reference.offset+offset));
blocksize:=1+Lengthsleb128(sym.localloc.reference.offset+offset);
end
{$ifdef wasm}
else if sym.localloc.reference.base=NR_LOCAL_STACK_POINTER_REG then
begin
templist.concat(tai_const.create_8bit(ord(DW_OP_WASM_location)));
templist.concat(tai_const.create_8bit(0)); { 0 = WebAssembly Local }
templist.concat(tai_const.create_uleb128bit(sym.localloc.reference.offset+offset));
blocksize:=2+Lengthuleb128(sym.localloc.reference.offset+offset);
end
{$endif wasm}
else
begin
dreg:=dwarf_reg(sym.localloc.reference.base);