Make llvm-pdbdump print column info when available

llvm-pdbdump already had code to retrieve column information in the line tables, but it wasn't using it.

Most Microsoft PDBs don't seem to have column info, so this wasn't missed. But Clang includes column info by default (at least for now), and being able to see that is useful for ensuring we get the column info correct.

Differential Revision: https://reviews.llvm.org/D23629

llvm-svn: 279001
This commit is contained in:
Adrian McCarthy 2016-08-17 23:01:03 +00:00
parent dce7c4eb18
commit d5ca720209
1 changed files with 9 additions and 0 deletions

View File

@ -76,6 +76,15 @@ void CompilandDumper::start(const PDBSymbolCompiland &Symbol,
if (LineStart != LineEnd)
WithColor(Printer, StatementColor).get() << " - " << LineEnd;
uint32_t ColumnStart = Line->getColumnNumber();
uint32_t ColumnEnd = Line->getColumnNumberEnd();
if (ColumnStart != 0 || ColumnEnd != 0) {
Printer << ", Column: ";
WithColor(Printer, StatementColor).get() << ColumnStart;
if (ColumnEnd != ColumnStart)
WithColor(Printer, StatementColor).get() << " - " << ColumnEnd;
}
Printer << ", Address: ";
if (Line->getLength() > 0) {
uint64_t AddrStart = Line->getVirtualAddress();