rdi_from_dwarf: readjust struct hashing, avoid following member ptrs for now

This commit is contained in:
Ryan Fleury committed 2026-08-26 14:56:24 -07:00
1 parent 58948fab3d
commit c1309e2948
5 files changed
+24 -10

No files matched your search

-2
View File
@@ -459,8 +459,6 @@ type_coverage_eval_tests(void)
const char const_string_array[] = "Hello, World!";
const char *const const_ptr_const_string = "Hello, World!";
char *test = ")";
MyByte *non_string_byte_ptr = "Hello, World!";
void *pointer = &basics;
+1 -1
View File
@@ -87,7 +87,7 @@
// [ ] memory_size(...) view for quickly evaluating memory sizes
// [ ] value coloring view in watch window, so you can quickly scroll & see values outside of a threshold
//
// [ ] more things should move to user data, but project-tagged - like
// [x] more things should move to user data, but project-tagged - like
// recent files, watches?, etc.
//
// [ ] linux/dwarf fixes
+9 -6
View File
@@ -1624,18 +1624,18 @@ d2r_convert(Arena *arena, D2R_ConvertParams *params)
top_task->dependency_count = already_computed_dependency_count;
}
//- rjf: unpack task's unit
Rng1U64 unit_info_tag_range = unit_info_tag_ranges[top_task->unit_idx];
DW2_ParseCtx *unit_parse_ctx = &unit_parse_ctxs[top_task->unit_idx];
//- rjf: determine if we're done with this hash
B32 done = (found_already_computed_hash || (top_task->depth == 0 && top_task->start_off != top_task->off));
B32 done = (found_already_computed_hash || (top_task->depth == 0 && top_task->start_off != top_task->off) || !contains_1u64(unit_info_tag_range, top_task->off));
//- rjf: if we're not done -> continue contributing to the task's hash
if(!done)
{
Temp tag_scratch = scratch_begin(&dedup_root_scratch.arena, 1);
// rjf: unpack unit
Rng1U64 unit_info_tag_range = unit_info_tag_ranges[top_task->unit_idx];
DW2_ParseCtx *unit_parse_ctx = &unit_parse_ctxs[top_task->unit_idx];
// rjf: read next tag
DW2_Tag tag = {0};
U64 start_off = top_task->off;
@@ -1707,7 +1707,10 @@ d2r_convert(Arena *arena, D2R_ConvertParams *params)
// rjf: unpack type reference in this tag
DW2_Attrib *type_attrib = &dw2_attrib_nil;
U64 type_info_off = 0;
if(include_tag_in_hash)
if(include_tag_in_hash && (!top_task->is_member || (tag.kind != DW_TagKind_PointerType &&
tag.kind != DW_TagKind_PtrToMemberType &&
tag.kind != DW_TagKind_ReferenceType &&
tag.kind != DW_TagKind_RValueReferenceType)))
{
type_attrib = dw2_attrib_from_kind(&tag, DW_AttribKind_Type);
type_info_off = dw2_reference_info_off_from_form_val(unit_parse_ctx, &type_attrib->val);