-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Add support for structs and tuple info lookup from DWARF #7775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lldb] Add support for structs and tuple info lookup from DWARF #7775
Conversation
53393ed
to
f9df834
Compare
@swift-ci test |
1 similar comment
# Check if we should compile in Swift embedded mode | ||
#---------------------------------------------------------------------- | ||
ifeq "$(SWIFT_EMBEDDED_MODE)" "1" | ||
SWIFTFLAGS += -gdwarf-types -enable-experimental-feature Embedded -Xfrontend -disable-objc-interop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should -enable-experimental-feature Embedded imply -gdwarf-types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it shouldn't turn on debug info if it's off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm trying to say is: The swift-driver should turn -g -enable-experimental-feature Embedded
into -gdwarf-types -enable-experimental-feature Embedded
. Feel free to make this a separate commit
@swift-ci test Windows |
6429816
to
5d5f4e6
Compare
@swift-ci test |
lldb/source/Plugins/LanguageRuntime/Swift/ReflectionContext.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserSwiftDescriptorFinder.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserSwiftDescriptorFinder.cpp
Outdated
Show resolved
Hide resolved
|
||
// TODO: this seems simple to calculate but maybe we should encode the stride | ||
// in DWARF? That's what reflection metadata does. | ||
unsigned stride = ((byte_size + alignment - 1) & ~(alignment - 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use llvm::alignTo for better readability? https://llvm.org/doxygen/namespacellvm.html#a0654c8f28b6096222fdc77c843576ad6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually tried using that before, but it isn't the same operation as llvm::alignTo
(or any other function in math extras that I could find).
lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp
Outdated
Show resolved
Hide resolved
@swift-ci test macOS |
5d5f4e6
to
320510e
Compare
@swift-ci test |
@swift-ci test Windows |
To support embedded Swift, lldb will need to support reading type information from DWARF instead of reflection metadata (whivh it corrently relies on). This patch implements the DescriptorFinder interface by DWARFASTParserSwift, which allows it to provide the data necessary for type info reconstruction without relying on reflection metadata.
320510e
to
a5ee83c
Compare
@swift-ci test |
@swift-ci test Windows |
To support embedded Swift, lldb will need to support reading type information from DWARF instead of reflection metadata (whivh it corrently relies on). This patch implements the DescriptorFinder interface by DWARFASTParserSwift, which allows it to provide the data necessary for type info reconstruction without relying on reflection metadata.