From 44c6b6e4d5f1eb76909066e8b16060637fc70d50 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 5 May 2026 12:22:20 -0700 Subject: [PATCH] do not duplicate function records for decls --- src/raddbg/raddbg_main.c | 5 +++++ src/rdi_from_dwarf/rdi_from_dwarf_2.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index c8fb7153..80ca6073 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -4,6 +4,11 @@ //////////////////////////////// //~ 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! // //- evaluation space coverage pass diff --git a/src/rdi_from_dwarf/rdi_from_dwarf_2.c b/src/rdi_from_dwarf/rdi_from_dwarf_2.c index 9cfb33aa..d093de85 100644 --- a/src/rdi_from_dwarf/rdi_from_dwarf_2.c +++ b/src/rdi_from_dwarf/rdi_from_dwarf_2.c @@ -3352,6 +3352,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params) DW2_Attrib *location_attrib = &dw2_attrib_nil; DW2_Attrib *framebase_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) { switch(n->v.attrib_kind) @@ -3369,6 +3370,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params) Case(location, Location); Case(framebase, FrameBase); Case(external, External); + Case(decl, Declaration); #undef Case } } @@ -3380,6 +3382,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params) String8 link_name = linkname_attrib->val.string; DW_InlKind inl_kind = (DW_InlKind)inline_attrib->val.u128.u64[0]; B32 is_external = (external_attrib != &dw2_attrib_nil); + B32 is_decl = (decl_attrib != &dw2_attrib_nil); //////////////////////// //- rjf: unpack ranges @@ -4255,6 +4258,7 @@ d2r2_convert(Arena *arena, D2R2_ConvertParams *params) //- rjf: subprograms (procedures) case DW_TagKind_SubProgram: + if(!is_decl) { 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);