This is an archive of the discontinued LLVM Phabricator instance.

CodeView symbol dumper: use symbolic names for registers
AcceptedPublic

Authored by hans on Oct 2 2017, 10:33 AM.

Details

Reviewers
rnk
Summary

This makes the output a little easier to read.

Diff Detail

Event Timeline

hans created this revision.Oct 2 2017, 10:33 AM
rnk accepted this revision.Oct 2 2017, 10:33 AM

lgtm

lib/DebugInfo/CodeView/SymbolDumper.cpp
321

... we already had this? >_<

This revision is now accepted and ready to land.Oct 2 2017, 10:33 AM
hans added inline comments.Oct 2 2017, 10:34 AM
test/DebugInfo/COFF/fp-stack.ll
15

This one is a bit mysterious.. 128 / 0x80 is not in the RegisterId. Is the enum missing floating-point registers perhaps?

rnk added inline comments.Oct 2 2017, 10:42 AM
test/DebugInfo/COFF/fp-stack.ll
15

I guess it's FP0, from reading the comments in X86MCTargetDesc.cpp:

// The x87 registers start at 128 and are numbered sequentially.
unsigned FP0Start = 128;
for (unsigned I = 0; I < 8; ++I)
  MRI->mapLLVMRegToCVReg(X86::FP0 + I, FP0Start + I);
rnk added a subscriber: zturner.Oct 2 2017, 10:42 AM
hans added inline comments.Oct 2 2017, 10:44 AM
lib/DebugInfo/CodeView/SymbolDumper.cpp
321

Looks like it came in with the PDB stuff in r270628.

test/DebugInfo/COFF/fp-stack.ll
15

Oh, I guess it's FP0. I'll see if I can add it to the enum in a follow-up.

zturner added inline comments.Oct 2 2017, 10:57 AM
test/DebugInfo/COFF/fp-stack.ll
15

These enumeration values are derived from the CV_HREG_e enumeration which is in cvconst.h

https://github.com/Microsoft/microsoft-pdb/blob/master/include/cvconst.h

In the followup, can you call them ST0, ST1, etc, to maintain naming consistency with the enumeration in cvconst?