-
Notifications
You must be signed in to change notification settings - Fork 345
[lldb] Add Swift exception breakpoint frame recognizer #11097
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
base: stable/21.x
Are you sure you want to change the base?
[lldb] Add Swift exception breakpoint frame recognizer #11097
Conversation
@swift-ci test |
A follow up to this is to implement |
@swift-ci test macOS |
9 similar comments
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test macOS |
@swift-ci test |
Depends on llvm#152201 |
7a6b847
to
873a804
Compare
@swift-ci test |
873a804
to
c32f0e8
Compare
@swift-ci test |
@swift-ci test windows |
c32f0e8
to
24a758a
Compare
@swift-ci test |
Fixes a bug that surfaces in frame recognizers. Details about the bug: A new frame recognizer is configured to match a specific symbol (`swift_willThrow`). This is an `extern "C"` symbol defined in a C++ source file. When Swift is built with debug info, the function `ParseFunctionFromDWARF` will use the debug info to construct a function name that looks like a C++ declaration (`::swift_willThrow(void *, SwiftError**)`). The `Mangled` instance will have this string as its `m_demangled` field, and have _no_ string for its `m_mangled` field. The result is the frame recognizer would not match the symbol to the name (`swift_willThrow` != `::swift_willThrow(void *, SwiftError**)`. By changing `ParseFunctionFromDWARF` to assign both a demangled name and a mangled, frame recognizers can successfully match symbols in this configuration. (cherry picked from commit 2959051)
24a758a
to
d97c0f6
Compare
@swift-ci test |
rebased to stable/21.x |
Adds a frame recognizer for Swift breakpoint exceptions (
break set -E swift
).This initial version does the following:
Selecting the frame where the throw occurs allows more direct inspection of the context that is throwing, and avoids displaying Swift's internal callback hook, which isa frame with no source and no variables – only disassembly.
rdar://156452605