This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add support for recognizing swift ast sections in object files
ClosedPublic

Authored by bulbazord on Aug 29 2023, 2:30 PM.

Details

Summary

In Apple's downstream fork, there is support for understanding the swift
AST sections in various binaries. Even though the lldb on llvm.org does
not have support for debugging swift, I think it makes sense to move
support for recognizing swift ast sections upstream.

Diff Detail

Event Timeline

bulbazord created this revision.Aug 29 2023, 2:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2023, 2:30 PM
Herald added a subscriber: emaste. · View Herald Transcript
bulbazord requested review of this revision.Aug 29 2023, 2:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2023, 2:30 PM
kastiglione added inline comments.Aug 29 2023, 2:57 PM
lldb/source/Core/Section.cpp
153

I wonder if this should be "swiftmodules". I have never seen it spelled with a hyphen.

compnerd accepted this revision.Aug 29 2023, 9:11 PM

LGTM with @kastiglione's comments addressed.

lldb/source/Core/Section.cpp
153

Is it actually more than one module? If not, swift-module would make sense given the DWARF cases - it is a "Swift Module" converted to lower kebab case.

This revision is now accepted and ready to land.Aug 29 2023, 9:11 PM
aprantl accepted this revision.Aug 30 2023, 2:55 PM
bulbazord added inline comments.Aug 30 2023, 2:56 PM
lldb/source/Core/Section.cpp
153

I added a hyphen to match the previous section types, but I'm not tied to the naming scheme.
I don't know if there is more than one module, but the enum case is plural so I made the string plural too.

JDevlieghere accepted this revision.Aug 30 2023, 4:13 PM

It seems like there is consensus for actually implementing this functionality but that there were some questions about the actual string. I hope everyone finds my reasoning understandable. If nobody has a strong objection to the actual string, I will land this tomorrow morning or afternoon.

This revision was landed with ongoing or failed builds.Aug 31 2023, 3:16 PM
This revision was automatically updated to reflect the committed changes.