本文整理汇总了C++中DWARFFormValue::extractValue方法的典型用法代码示例。如果您正苦于以下问题:C++ DWARFFormValue::extractValue方法的具体用法?C++ DWARFFormValue::extractValue怎么用?C++ DWARFFormValue::extractValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DWARFFormValue
的用法示例。
在下文中一共展示了DWARFFormValue::extractValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOffset
uint32_t
DWARFDebugInfoEntryMinimal::getAttributeValue(const DWARFCompileUnit *cu,
const uint16_t attr,
DWARFFormValue &form_value,
uint32_t *end_attr_offset_ptr)
const {
if (AbbrevDecl) {
uint32_t attr_idx = AbbrevDecl->findAttributeIndex(attr);
if (attr_idx != -1U) {
uint32_t offset = getOffset();
DataExtractor debug_info_data = cu->getDebugInfoExtractor();
// Skip the abbreviation code so we are at the data for the attributes
debug_info_data.getULEB128(&offset);
uint32_t idx = 0;
while (idx < attr_idx)
DWARFFormValue::skipValue(AbbrevDecl->getFormByIndex(idx++),
debug_info_data, &offset, cu);
const uint32_t attr_offset = offset;
form_value = DWARFFormValue(AbbrevDecl->getFormByIndex(idx));
if (form_value.extractValue(debug_info_data, &offset, cu)) {
if (end_attr_offset_ptr)
*end_attr_offset_ptr = offset;
return attr_offset;
}
}
}
return 0;
}
示例2: getAttributeValue
bool DWARFDebugInfoEntryMinimal::getAttributeValue(
const DWARFUnit *U, const uint16_t Attr, DWARFFormValue &FormValue) const {
if (!AbbrevDecl)
return false;
uint32_t AttrIdx = AbbrevDecl->findAttributeIndex(Attr);
if (AttrIdx == -1U)
return false;
DataExtractor DebugInfoData = U->getDebugInfoExtractor();
uint32_t DebugInfoOffset = getOffset();
// Skip the abbreviation code so we are at the data for the attributes
DebugInfoData.getULEB128(&DebugInfoOffset);
// Skip preceding attribute values.
for (uint32_t i = 0; i < AttrIdx; ++i) {
DWARFFormValue::skipValue(AbbrevDecl->getFormByIndex(i),
DebugInfoData, &DebugInfoOffset, U);
}
FormValue = DWARFFormValue(AbbrevDecl->getFormByIndex(AttrIdx));
return FormValue.extractValue(DebugInfoData, &DebugInfoOffset, U);
}