authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-12-30 16:21:16+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-12-30 17:00:50+02:00
logf874b5e1e08860c169b9a318391aabedfd3f7ff0
tree6f6c6d20994952a9558fa9c73fb2357601fad8c4
parent67316e2eab68f19778af82018eb32af1d1b575b3

llvm: work around lldb bugs

Closes #14122

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

src/codegen/llvm.zig+8-4
......@@ -1459,7 +1459,8 @@ pub const Object = struct {
14591459 .signed => DW.ATE.signed,
14601460 .unsigned => DW.ATE.unsigned,
14611461 };
1462 const di_type = dib.createBasicType(name, info.bits, dwarf_encoding);
1462 const di_bits = ty.abiSize(target) * 8; // lldb cannot handle non-byte sized types
1463 const di_type = dib.createBasicType(name, di_bits, dwarf_encoding);
14631464 gop.value_ptr.* = AnnotatedDITypePtr.initFull(di_type);
14641465 return di_type;
14651466 },
......@@ -1550,7 +1551,8 @@ pub const Object = struct {
15501551 return di_type;
15511552 },
15521553 .Bool => {
1553 const di_type = dib.createBasicType("bool", 1, DW.ATE.boolean);
1554 const di_bits = 8; // lldb cannot handle non-byte sized types
1555 const di_type = dib.createBasicType("bool", di_bits, DW.ATE.boolean);
15541556 gop.value_ptr.* = AnnotatedDITypePtr.initFull(di_type);
15551557 return di_type;
15561558 },
......@@ -1739,7 +1741,8 @@ pub const Object = struct {
17391741 var buf: Type.Payload.ElemType = undefined;
17401742 const child_ty = ty.optionalChild(&buf);
17411743 if (!child_ty.hasRuntimeBitsIgnoreComptime()) {
1742 const di_ty = dib.createBasicType(name, 1, DW.ATE.boolean);
1744 const di_bits = 8; // lldb cannot handle non-byte sized types
1745 const di_ty = dib.createBasicType(name, di_bits, DW.ATE.boolean);
17431746 gop.value_ptr.* = AnnotatedDITypePtr.initFull(di_ty);
17441747 return di_ty;
17451748 }
......@@ -1934,7 +1937,8 @@ pub const Object = struct {
19341937 .signed => DW.ATE.signed,
19351938 .unsigned => DW.ATE.unsigned,
19361939 };
1937 const di_ty = dib.createBasicType(name, info.bits, dwarf_encoding);
1940 const di_bits = ty.abiSize(target) * 8; // lldb cannot handle non-byte sized types
1941 const di_ty = dib.createBasicType(name, di_bits, dwarf_encoding);
19381942 gop.value_ptr.* = AnnotatedDITypePtr.initFull(di_ty);
19391943 return di_ty;
19401944 }