This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [ABI/X86] Split plugin class and base i386 class
ClosedPublic

Authored by mgorny on Oct 6 2021, 2:50 AM.

Details

Summary

Split the ABIX86 class into two classes: ABIX86 class used to define
the plugin, and ABIX86_i386 class that is the base for 32-bit ABIs.
This makes ABIX86 more suitable to become a common class for all ABIs,
and removes the confusing concept that ABIX86 initializes 64-bit ABIs
but is only the base for 32-bit ABIs.

Diff Detail

Event Timeline

mgorny created this revision.Oct 6 2021, 2:50 AM
mgorny requested review of this revision.Oct 6 2021, 2:50 AM
mgorny added inline comments.
lldb/source/Plugins/ABI/X86/ABIX86_i386.h
14

For the record, I'm not married to this name ;-). I was originally thinking of ABIX86_32 but it felt weird when all the ABIs carry _i386 suffix.

labath accepted this revision.Oct 6 2021, 3:43 AM
labath added inline comments.
lldb/source/Plugins/ABI/X86/ABIX86.h
15

Now it's weird that this class is in no relation to the ABI class, nor to the individual ABIXXX_YYY subclasses. Maybe lets insert it into the hierarchy (as a common superclass of ABIX86_i386 and ABIX86_64). Even if it's initially empty, I can imagine one could eventually put some common x86 code there.

This revision is now accepted and ready to land.Oct 6 2021, 3:43 AM
mgorny marked an inline comment as done.Oct 6 2021, 4:41 AM
mgorny added inline comments.
lldb/source/Plugins/ABI/X86/ABIX86.h
15

Sure, will do.

This revision was automatically updated to reflect the committed changes.
mgorny marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2021, 4:59 AM