本文整理汇总了C++中DWARFDebugArangeSet::Extract方法的典型用法代码示例。如果您正苦于以下问题:C++ DWARFDebugArangeSet::Extract方法的具体用法?C++ DWARFDebugArangeSet::Extract怎么用?C++ DWARFDebugArangeSet::Extract使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DWARFDebugArangeSet
的用法示例。
在下文中一共展示了DWARFDebugArangeSet::Extract方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: range_adder
//----------------------------------------------------------------------
// Extract
//----------------------------------------------------------------------
bool
DWARFDebugAranges::Extract(const DataExtractor &debug_aranges_data)
{
if (debug_aranges_data.ValidOffset(0))
{
uint32_t offset = 0;
typedef std::vector<DWARFDebugArangeSet> SetCollection;
typedef SetCollection::const_iterator SetCollectionIter;
SetCollection sets;
DWARFDebugArangeSet set;
Range range;
while (set.Extract(debug_aranges_data, &offset))
sets.push_back(set);
uint32_t count = 0;
for_each(sets.begin(), sets.end(), CountArangeDescriptors(count));
if (count > 0)
{
m_aranges.reserve(count);
AddArangeDescriptors range_adder(m_aranges);
for_each(sets.begin(), sets.end(), range_adder);
}
// puts("\n\nDWARFDebugAranges list is:\n");
// for_each(m_aranges.begin(), m_aranges.end(), PrintRange);
}
return false;
}
示例2: while
//----------------------------------------------------------------------
// Extract
//----------------------------------------------------------------------
bool
DWARFDebugAranges::Extract(const DataExtractor &debug_aranges_data)
{
if (debug_aranges_data.ValidOffset(0))
{
uint32_t offset = 0;
DWARFDebugArangeSet set;
Range range;
while (set.Extract(debug_aranges_data, &offset))
{
const uint32_t num_descriptors = set.NumDescriptors();
if (num_descriptors > 0)
{
const dw_offset_t cu_offset = set.GetCompileUnitDIEOffset();
for (uint32_t i=0; i<num_descriptors; ++i)
{
const DWARFDebugArangeSet::Descriptor &descriptor = set.GetDescriptorRef(i);
m_aranges.Append(RangeToDIE::Entry (descriptor.address, descriptor.length, cu_offset));
}
}
set.Clear();
}
}
return false;
}
示例3: while
//----------------------------------------------------------------------
// Dump
//----------------------------------------------------------------------
void
DWARFDebugAranges::Dump(SymbolFileDWARF* dwarf2Data, Stream *s)
{
const DataExtractor &debug_aranges_data = dwarf2Data->get_debug_aranges_data();
if (debug_aranges_data.ValidOffset(0))
{
uint32_t offset = 0;
DWARFDebugArangeSet set;
while (set.Extract(debug_aranges_data, &offset))
set.Dump(s);
}
else
s->PutCString("< EMPTY >\n");
}