authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-16 14:20:51-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-16 14:20:51-07:00
logf4ee46e8395228cdcb1d5f7f2ac8b4ebd955b07f
treee763f377561abea870c36edcf68cbe79866a8e11
parentc8b78706b74d16ed21113096d2b47717abb53d4d

MachO/DebugSymbols: fix debug line offset

In c8b78706b74d16ed21113096d2b47717abb53d4d I incorrectly made it be the line offset from Decl to function lbrace; it needed to be line offset from lbrace to rbrace.

1 files changed, 1 insertions(+), 1 deletions(-)

src/link/MachO/DebugSymbols.zig+1-1
......@@ -1064,7 +1064,7 @@ pub fn commitDeclDebugInfo(
10641064
10651065 try dbg_line_buffer.append(DW.LNS_advance_line);
10661066 const func = decl.val.castTag(.function).?.data;
1067 const line_off = @intCast(u28, decl.src_line + func.lbrace_line);
1067 const line_off = @intCast(u28, func.rbrace_line - func.lbrace_line);
10681068 try leb.writeULEB128(dbg_line_buffer.writer(), line_off);
10691069 }
10701070