本文整理汇总了C++中DIE::addValue方法的典型用法代码示例。如果您正苦于以下问题:C++ DIE::addValue方法的具体用法?C++ DIE::addValue怎么用?C++ DIE::addValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIE
的用法示例。
在下文中一共展示了DIE::addValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addLocalLabelAddress
void DwarfCompileUnit::addLocalLabelAddress(DIE &Die,
dwarf::Attribute Attribute,
const MCSymbol *Label) {
if (Label)
DD->addArangeLabel(SymbolCU(this, Label));
if (Label)
Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_addr,
DIELabel(Label));
else
Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_addr,
DIEInteger(0));
}
示例2: addLabelAddress
/// addLabelAddress - Add a dwarf label attribute data and value using
/// DW_FORM_addr or DW_FORM_GNU_addr_index.
void DwarfCompileUnit::addLabelAddress(DIE &Die, dwarf::Attribute Attribute,
const MCSymbol *Label) {
// Don't use the address pool in non-fission or in the skeleton unit itself.
// FIXME: Once GDB supports this, it's probably worthwhile using the address
// pool from the skeleton - maybe even in non-fission (possibly fewer
// relocations by sharing them in the pool, but we have other ideas about how
// to reduce the number of relocations as well/instead).
if ((!DD->useSplitDwarf() || !Skeleton) && DD->getDwarfVersion() < 5)
return addLocalLabelAddress(Die, Attribute, Label);
if (Label)
DD->addArangeLabel(SymbolCU(this, Label));
unsigned idx = DD->getAddressPool().getIndex(Label);
Die.addValue(DIEValueAllocator, Attribute,
DD->getDwarfVersion() >= 5 ? dwarf::DW_FORM_addrx
: dwarf::DW_FORM_GNU_addr_index,
DIEInteger(idx));
}
示例3: addAddressExpr
void DwarfCompileUnit::addAddressExpr(DIE &Die, dwarf::Attribute Attribute,
const MCExpr *Expr) {
Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_addr,
DIEExpr(Expr));
}
示例4: applyStmtList
void DwarfCompileUnit::applyStmtList(DIE &D) {
D.addValue(DIEValueAllocator, *StmtListValue);
}
示例5: addLocationList
/// Add a Dwarf loclistptr attribute data and value.
void DwarfCompileUnit::addLocationList(DIE &Die, dwarf::Attribute Attribute,
unsigned Index) {
dwarf::Form Form = DD->getDwarfVersion() >= 4 ? dwarf::DW_FORM_sec_offset
: dwarf::DW_FORM_data4;
Die.addValue(DIEValueAllocator, Attribute, Form, DIELocList(Index));
}