do not duplicate function records for decls

This commit is contained in:
Ryan Fleury
2026-05-05 12:22:20 -07:00
parent d9f7385f81
commit 44c6b6e4d5
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -4,6 +4,11 @@
//////////////////////////////// ////////////////////////////////
//~ rjf: post-0.9.25 TODO notes //~ rjf: post-0.9.25 TODO notes
// //
// [ ] linux fixes
// [ ] step-over/step-into doesn't step successfully in many cases, just causes a continue
// [ ] rd_frame has no type info, should be (void -> void) - type should be generated but it
// is not being hooked up correctly
//
// [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception! // [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception!
// //
//- evaluation space coverage pass //- evaluation space coverage pass
+4
View File
@@ -3352,6 +3352,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params)
DW2_Attrib *location_attrib = &dw2_attrib_nil; DW2_Attrib *location_attrib = &dw2_attrib_nil;
DW2_Attrib *framebase_attrib = &dw2_attrib_nil; DW2_Attrib *framebase_attrib = &dw2_attrib_nil;
DW2_Attrib *external_attrib = &dw2_attrib_nil; DW2_Attrib *external_attrib = &dw2_attrib_nil;
DW2_Attrib *decl_attrib = &dw2_attrib_nil;
for EachNode(n, DW2_AttribNode, tag.attribs.first) for EachNode(n, DW2_AttribNode, tag.attribs.first)
{ {
switch(n->v.attrib_kind) switch(n->v.attrib_kind)
@@ -3369,6 +3370,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params)
Case(location, Location); Case(location, Location);
Case(framebase, FrameBase); Case(framebase, FrameBase);
Case(external, External); Case(external, External);
Case(decl, Declaration);
#undef Case #undef Case
} }
} }
@@ -3380,6 +3382,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params)
String8 link_name = linkname_attrib->val.string; String8 link_name = linkname_attrib->val.string;
DW_InlKind inl_kind = (DW_InlKind)inline_attrib->val.u128.u64[0]; DW_InlKind inl_kind = (DW_InlKind)inline_attrib->val.u128.u64[0];
B32 is_external = (external_attrib != &dw2_attrib_nil); B32 is_external = (external_attrib != &dw2_attrib_nil);
B32 is_decl = (decl_attrib != &dw2_attrib_nil);
//////////////////////// ////////////////////////
//- rjf: unpack ranges //- rjf: unpack ranges
@@ -4255,6 +4258,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params)
//- rjf: subprograms (procedures) //- rjf: subprograms (procedures)
case DW_TagKind_SubProgram: case DW_TagKind_SubProgram:
if(!is_decl)
{ {
RDIM_Scope *root_scope = rdim_scope_chunk_list_push(arena, &dst_artifacts->scopes, chunk_count); RDIM_Scope *root_scope = rdim_scope_chunk_list_push(arena, &dst_artifacts->scopes, chunk_count);
RDIM_Symbol *procedure = rdim_symbol_chunk_list_push(arena, &dst_artifacts->procedures, chunk_count); RDIM_Symbol *procedure = rdim_symbol_chunk_list_push(arena, &dst_artifacts->procedures, chunk_count);