Skip to content

[lldb] Prevent IsSwiftMangledName false positives #3984

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

Conversation

kastiglione
Copy link

@kastiglione kastiglione commented Feb 23, 2022

Some non-swift symbols can unintentionally cause isSwiftSymbol to return true. Any symbol starting with _T is considered a swift symbol because "old-style" mangling used this prefix.

Prevent this by special casing _T-prefixed symbols. The only kind of old-style mangled that lldb should expect to see are ObjC class and protocol names. Classes use a _TtC or _TtGC prefix (the latter is for generics). Protocols are _TtP.

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test Linux

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test Linux

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione kastiglione merged commit 06653e8 into stable/20211026 Feb 25, 2022
@kastiglione kastiglione deleted the lldb-Prevent-IsSwiftMangledName-false-positives branch February 25, 2022 05:36
kastiglione added a commit that referenced this pull request Mar 24, 2022
Some non-swift symbols can unintentionally cause `isSwiftSymbol` to return true. Any symbol starting with `_T` is considered a swift symbol because "old-style" mangling used this prefix.

Prevent this by special casing `_T`-prefixed symbols. The only kind of old-style mangled that lldb should expect to see are ObjC class and protocol names. Classes use a `_TtC` or `_TtGC` prefix (the latter is for generics). Protocols are `_TtP`.

(cherry picked from commit 06653e8)
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.

2 participants