-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Support frame variable for generic types in embedded Swift #8267
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] Support frame variable for generic types in embedded Swift #8267
Conversation
Support finding generic types when debugging embedded Swift by following the DW_AT_linkage_name attribute emitted by the compiler that connects the substituted generic type back to the non-substituted one.
@@ -129,3 +129,61 @@ def test(self): | |||
"subSubField = (field = 4.2000000000000002)", | |||
], | |||
) | |||
|
|||
self.expect( |
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.
It would be more stable to use lldbutil.check_variable
here.
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.
check_variable
doesn't allow for checking for substrings, which I need in most of these tests
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 meant was to write this as a chain of
var = frame.FindVariable("foo")
child = var.GetChildAtIndex(0)
lldbutil.check_var(child, ...)
So each check is precise and not depending on the formatting of the aggregate type.
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.
Ok, I'll do that in an NFC patch, as that file has a lot of checks and will take a while to convert them all
lldb/test/API/lang/swift/embedded/frame_variable/TestSwiftEmbeddedFrameVariable.py
Show resolved
Hide resolved
1 similar comment
@swift-ci test Windows |
@swift-ci test macOS |
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserSwiftDescriptorFinder.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserSwiftDescriptorFinder.cpp
Outdated
Show resolved
Hide resolved
38edc34
to
75a08e3
Compare
@swift-ci test |
Support finding generic types when debugging embedded Swift by following the DW_AT_linkage_name attribute emitted by the compiler that connects the substituted generic type back to the non-substituted one.