コード例 #1
0
ファイル: Section.cpp プロジェクト: carlokok/lldb
SectionSP
SectionList::FindSectionContainingLinkedFileAddress (addr_t vm_addr, uint32_t depth) const
{
    //if (m_range_cache.IsEmpty())
    //    BuildRangeCache();
#ifdef LLDB_CONFIGURATION_DEBUG
    assert(m_finalized);
#endif
    
    SectionRangeCache::Entry *entry = m_range_cache.FindEntryThatContains(vm_addr);
    
    if (entry)
        return m_sections[entry->data];
        
    if (depth == 0)
        return SectionSP();
    
    for (const_iterator si = m_sections.begin(), se = m_sections.end();
         si != se;
         ++si)
    {
        Section *sect = si->get();
        
        SectionSP sect_sp = sect->GetChildren().FindSectionContainingLinkedFileAddress(vm_addr, depth - 1);
            
        if (sect_sp)
            return sect_sp;
    }
    
    return SectionSP();
}
コード例 #2
0
ファイル: Section.cpp プロジェクト: carlokok/lldb
void
SectionList::Finalize ()
{
    BuildRangeCache();
    
    for (const_iterator si = m_sections.begin(), se = m_sections.end();
         si != se;
         ++si)
    {
        Section *sect = si->get();
        
        sect->GetChildren().Finalize();
    }
}
コード例 #3
0
ファイル: Section.cpp プロジェクト: eightcien/lldb
SectionSP
SectionList::FindSectionContainingLinkedFileAddress (addr_t vm_addr, uint32_t depth) const
{
    SectionSP sect_sp;
    const_iterator sect_iter;
    const_iterator end = m_sections.end();
    for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter)
    {
        Section *sect = sect_iter->get();
        if (sect->ContainsLinkedFileAddress (vm_addr))
        {
            sect_sp = *sect_iter;
        }
        else if (depth > 0)
        {
            sect_sp = sect->GetChildren().FindSectionContainingLinkedFileAddress (vm_addr, depth - 1);
        }
    }
    return sect_sp;
}
コード例 #4
0
ファイル: Section.cpp プロジェクト: carlokok/lldb
SectionSP
SectionList::FindSectionContainingFileAddress (addr_t vm_addr, uint32_t depth) const
{
    SectionSP sect_sp;
    const_iterator sect_iter;
    const_iterator end = m_sections.end();
    for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter)
    {
        Section *sect = sect_iter->get();
        if (sect->ContainsFileAddress (vm_addr))
        {
            // The file address is in this section. We need to make sure one of our child
            // sections doesn't contain this address as well as obeying the depth limit
            // that was passed in.
            if (depth > 0)
                sect_sp = sect->GetChildren().FindSectionContainingFileAddress(vm_addr, depth - 1);

            if (sect_sp.get() == NULL && !sect->IsFake())
                sect_sp = *sect_iter;
        }
    }
    return sect_sp;
}