forked from OSchip/llvm-project
Improve the debug output of DwarfDebug::buildLocationList().
llvm-svn: 262265
This commit is contained in:
parent
a349714bf9
commit
dba58fbdd9
|
@ -76,6 +76,20 @@ public:
|
||||||
const DIExpression *getExpression() const { return Expression; }
|
const DIExpression *getExpression() const { return Expression; }
|
||||||
friend bool operator==(const Value &, const Value &);
|
friend bool operator==(const Value &, const Value &);
|
||||||
friend bool operator<(const Value &, const Value &);
|
friend bool operator<(const Value &, const Value &);
|
||||||
|
void dump() const {
|
||||||
|
if (isLocation()) {
|
||||||
|
llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " ";
|
||||||
|
if (Loc.isIndirect())
|
||||||
|
llvm::dbgs() << '+' << Loc.getOffset();
|
||||||
|
llvm::dbgs() << "} ";
|
||||||
|
}
|
||||||
|
else if (isConstantInt())
|
||||||
|
Constant.CIP->dump();
|
||||||
|
else if (isConstantFP())
|
||||||
|
Constant.CFP->dump();
|
||||||
|
if (Expression)
|
||||||
|
Expression->dump();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -916,7 +916,7 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
|
||||||
DEBUG({
|
DEBUG({
|
||||||
dbgs() << CurEntry->getValues().size() << " Values:\n";
|
dbgs() << CurEntry->getValues().size() << " Values:\n";
|
||||||
for (auto &Value : CurEntry->getValues())
|
for (auto &Value : CurEntry->getValues())
|
||||||
Value.getExpression()->dump();
|
Value.dump();
|
||||||
dbgs() << "-----\n";
|
dbgs() << "-----\n";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue