Skip to content

[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

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

augusto2112
Copy link

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.

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.
@augusto2112
Copy link
Author

swiftlang/swift#71827

@swift-ci test

@@ -129,3 +129,61 @@ def test(self):
"subSubField = (field = 4.2000000000000002)",
],
)

self.expect(

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.

Copy link
Author

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

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.

Copy link
Author

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

@augusto2112
Copy link
Author

swiftlang/swift#71939

@swift-ci test

1 similar comment
@augusto2112
Copy link
Author

swiftlang/swift#71939

@swift-ci test

@augusto2112
Copy link
Author

swiftlang/swift#71939

@swift-ci test Windows

@augusto2112
Copy link
Author

swiftlang/swift#71939

@swift-ci test macOS

@augusto2112
Copy link
Author

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants