This is an archive of the discontinued LLVM Phabricator instance.

Make the Twine pretty-printer work with GDB 7.11
ClosedPublic

Authored by arichardson on May 3 2017, 4:33 AM.

Details

Summary

Apparently ::NodeKind is sometimes part of the name in GDB.
Without this patch I get the following error message from GDB:
Unhandled NodeKind llvm::Twine::NodeKind::EmptyKind.

Diff Detail

Repository
rL LLVM

Event Timeline

arichardson created this revision.May 3 2017, 4:33 AM
dblaikie added inline comments.May 3 2017, 10:07 AM
utils/gdb-scripts/prettyprinters.py
230–231 ↗(On Diff #97600)

is this a performance optimization, or for correctness in some way?

arichardson added inline comments.May 3 2017, 3:33 PM
utils/gdb-scripts/prettyprinters.py
230–231 ↗(On Diff #97600)

No this is not required, I just added it because it is an easy way to avoid two unnecessary string concatenations (which probably allocate memory). I can remove it if you prefer.

dblaikie accepted this revision.Jun 1 2017, 3:07 PM
dblaikie added inline comments.
utils/gdb-scripts/prettyprinters.py
230–231 ↗(On Diff #97600)

Not too fussed - maybe include a comment if you like. :)

This revision is now accepted and ready to land.Jun 1 2017, 3:07 PM

I don't have commit access, could you commit for me please?

This revision was automatically updated to reflect the committed changes.