1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Correctly handle {Always,Never}StepIntoLine

llvm-svn: 259806
This commit is contained in:
David Majnemer 2016-02-04 17:57:12 +00:00
parent 2b3e2654f3
commit 85fe175353
2 changed files with 10 additions and 8 deletions

View File

@ -35,6 +35,7 @@ public:
};
LineInfo(uint32_t StartLine, uint32_t EndLine, bool IsStatement);
LineInfo(uint32_t LineData) : LineData(LineData) {}
uint32_t getStartLine() const { return LineData & StartLineMask; }

View File

@ -1154,14 +1154,15 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName,
char Buffer[32];
format("+0x%X", PC).snprint(Buffer, 32);
ListScope PCScope(W, Buffer);
uint32_t LineNumberStart = LineData & codeview::LineInfo::StartLineMask;
uint32_t LineNumberEndDelta =
(LineData & codeview::LineInfo::EndLineDeltaMask) >>
codeview::LineInfo::EndLineDeltaShift;
bool IsStatement = LineData & codeview::LineInfo::StatementFlag;
W.printNumber("LineNumberStart", LineNumberStart);
W.printNumber("LineNumberEndDelta", LineNumberEndDelta);
W.printBoolean("IsStatement", IsStatement);
LineInfo LI(LineData);
if (LI.isAlwaysStepInto())
W.printString("StepInto", StringRef("Always"));
else if (LI.isNeverStepInto())
W.printString("StepInto", StringRef("Never"));
else
W.printNumber("LineNumberStart", LI.getStartLine());
W.printNumber("LineNumberEndDelta", LI.getLineDelta());
W.printBoolean("IsStatement", LI.isStatement());
if (HasColumnInformation &&
ColumnDE.isValidOffsetForDataOfSize(ColumnOffset, 4)) {
uint16_t ColStart = ColumnDE.getU16(&ColumnOffset);