Page MenuHomePhabricator

Avoid fragile type lookups in GDB pretty printer
ClosedPublic

Authored by MoritzS on Jan 11 2021, 9:55 AM.

Details

Summary

Instead of using the type llvm::StringMapEntry<{stringified_value_type}>
use only the base class llvm::StringMapEntryBase and calculate the
offsets of the member variables manually. The approach with stringifying
the name of the value type is pretty fragile as it can easily break with
local and dependent types.

Diff Detail

Event Timeline

MoritzS requested review of this revision.Jan 11 2021, 9:55 AM
MoritzS created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2021, 9:55 AM
csigg accepted this revision.Jan 11 2021, 12:09 PM

Yes, that does look safer.

This revision is now accepted and ready to land.Jan 11 2021, 12:09 PM

Thanks for the review! Can you commit this for me, please?

This revision was automatically updated to reflect the committed changes.