mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 12:30:28 +00:00
raddbg debug view for fixed capacity dynamic arrays
This commit is contained in:
@@ -3583,6 +3583,7 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
|
||||
lb_add_raddbg_string(m, "type_view: {type: \"[]?\", expr: \"array(data, len)\"}");
|
||||
lb_add_raddbg_string(m, "type_view: {type: \"string\", expr: \"array(data, len)\"}");
|
||||
lb_add_raddbg_string(m, "type_view: {type: \"[dynamic]?\", expr: \"rows($, array(data, len), len, cap, allocator)\"}");
|
||||
lb_add_raddbg_string(m, "type_view: {type: \"[dynamic;?]?\", expr: \"rows($, array(data, len), len)\"}");
|
||||
|
||||
// column major matrices
|
||||
lb_add_raddbg_string(m, "type_view: {type: \"matrix[1, ?]?\", expr: \"columns($.data, $[0])\"}");
|
||||
|
||||
@@ -442,14 +442,14 @@ gb_internal LLVMMetadataRef lb_debug_fixed_capacity_dynamic_array(lbModule *m, T
|
||||
LLVMDIFlagZero, lb_debug_type(m, elem_type)
|
||||
);
|
||||
|
||||
i64 len_offset = type_offset_of(bt, 1);
|
||||
i64 len_offset_in_bits = 8*type_offset_of(bt, 1);
|
||||
|
||||
elements[1] = LLVMDIBuilderCreateMemberType(
|
||||
m->debug_builder, member_scope,
|
||||
"len", 3,
|
||||
file, line,
|
||||
int_bits, int_bits,
|
||||
len_offset,
|
||||
len_offset_in_bits,
|
||||
LLVMDIFlagZero, lb_debug_type(m, t_int)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user