When searching for addresses we first see if the compile unit's DW_AT_ranges (or low/high pc) attribute contains the address we are looking for. Any CU that doesn't contain the address doesn't need to have its child DIEs parsed, just the top level DW_TAG_compile_unit DIE. Then we iterate over all the DIEs always descending into all of the children looking for DW_TAG_subprogram entries that contain the address we are looking for. So if we see a DW_TAG_namespace we just call recursively to parse its children.
> On Sep 14, 2023, at 3:50 PM, rifkin.jer--- via Dwarf-discuss > <dwarf-discuss@lists.dwarfstd.org> wrote: > > Hello, > What is the reasoning for not including range information on DW_TAG_namespace > DIEs? Is there a canonical way to check if a DW_TAG_namespace DIE contains a > given address? > > Thank you, > Jeremy > -- > Dwarf-discuss mailing list > Dwarf-discuss@lists.dwarfstd.org <mailto:Dwarf-discuss@lists.dwarfstd.org> > https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
-- Dwarf-discuss mailing list Dwarf-discuss@lists.dwarfstd.org https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss