//---------------------------------------------------------------------- // Dump // // Dump the contents of this DWARFDebugInfo object as has been parsed // and/or modified after it has been parsed. //---------------------------------------------------------------------- void DWARFDebugInfo::Dump(Stream *s, const uint32_t die_offset, const uint32_t recurse_depth) { DumpInfo dumpInfo(s, die_offset, recurse_depth); s->PutCString("Dumping .debug_info section from internal representation\n"); CompileUnitColl::const_iterator pos; uint32_t curr_depth = 0; ParseCompileUnitHeadersIfNeeded(); for (pos = m_compile_units.begin(); pos != m_compile_units.end(); ++pos) { DWARFCompileUnit *cu = pos->get(); DumpCallback(m_dwarf2Data, cu, NULL, 0, curr_depth, &dumpInfo); const DWARFDIE die = cu->DIE(); if (die) die.Dump(s, recurse_depth); } }
//---------------------------------------------------------------------- // Generate //---------------------------------------------------------------------- bool DWARFDebugAranges::Generate(SymbolFileDWARF* dwarf2Data) { Clear(); DWARFDebugInfo* debug_info = dwarf2Data->DebugInfo(); if (debug_info) { uint32_t cu_idx = 0; const uint32_t num_compile_units = dwarf2Data->GetNumCompileUnits(); for (cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) { DWARFCompileUnit* cu = debug_info->GetCompileUnitAtIndex(cu_idx); if (cu) cu->DIE()->BuildAddressRangeTable(dwarf2Data, cu, this); } } return !IsEmpty(); }