本文整理汇总了C++中DWARFAddressRangesVector::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ DWARFAddressRangesVector::push_back方法的具体用法?C++ DWARFAddressRangesVector::push_back怎么用?C++ DWARFAddressRangesVector::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DWARFAddressRangesVector
的用法示例。
在下文中一共展示了DWARFAddressRangesVector::push_back方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getAbsoluteRanges
DWARFAddressRangesVector DWARFDebugRangeList::getAbsoluteRanges(
llvm::Optional<SectionedAddress> BaseAddr) const {
DWARFAddressRangesVector Res;
for (const RangeListEntry &RLE : Entries) {
if (RLE.isBaseAddressSelectionEntry(AddressSize)) {
BaseAddr = {RLE.EndAddress, RLE.SectionIndex};
continue;
}
DWARFAddressRange E;
E.LowPC = RLE.StartAddress;
E.HighPC = RLE.EndAddress;
E.SectionIndex = RLE.SectionIndex;
// Base address of a range list entry is determined by the closest preceding
// base address selection entry in the same range list. It defaults to the
// base address of the compilation unit if there is no such entry.
if (BaseAddr) {
E.LowPC += BaseAddr->Address;
E.HighPC += BaseAddr->Address;
if (E.SectionIndex == -1ULL)
E.SectionIndex = BaseAddr->SectionIndex;
}
Res.push_back(E);
}
return Res;
}
示例2:
DWARFAddressRangesVector
DWARFDebugRangeList::getAbsoluteRanges(uint64_t BaseAddress) const {
DWARFAddressRangesVector Res;
for (const RangeListEntry &RLE : Entries) {
if (RLE.isBaseAddressSelectionEntry(AddressSize)) {
BaseAddress = RLE.EndAddress;
} else {
Res.push_back({BaseAddress + RLE.StartAddress,
BaseAddress + RLE.EndAddress, RLE.SectionIndex});
}
}
return Res;
}
示例3: getAbsoluteRanges
DWARFAddressRangesVector DWARFDebugRnglist::getAbsoluteRanges(
llvm::Optional<BaseAddress> BaseAddr) const {
DWARFAddressRangesVector Res;
for (const RangeListEntry &RLE : Entries) {
if (RLE.EntryKind == dwarf::DW_RLE_end_of_list)
break;
if (RLE.EntryKind == dwarf::DW_RLE_base_address) {
BaseAddr = {RLE.Value0, RLE.SectionIndex};
continue;
}
DWARFAddressRange E;
E.SectionIndex = RLE.SectionIndex;
if (BaseAddr && E.SectionIndex == -1ULL)
E.SectionIndex = BaseAddr->SectionIndex;
switch (RLE.EntryKind) {
case dwarf::DW_RLE_offset_pair:
E.LowPC = RLE.Value0;
E.HighPC = RLE.Value1;
if (BaseAddr) {
E.LowPC += BaseAddr->Address;
E.HighPC += BaseAddr->Address;
}
break;
case dwarf::DW_RLE_start_end:
E.LowPC = RLE.Value0;
E.HighPC = RLE.Value1;
break;
case dwarf::DW_RLE_start_length:
E.LowPC = RLE.Value0;
E.HighPC = E.LowPC + RLE.Value1;
break;
default:
// Unsupported encodings should have been reported during extraction,
// so we should not run into any here.
llvm_unreachable("Unsupported range list encoding");
}
Res.push_back(E);
}
return Res;
}