You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[lldb] Fix swift exception breakpoint command type filtering (#4027)
Specifying a typename filter for Swift exception breakpoints has been broken when creating breakpoints from the command line.
In other words, this command:
```
(lldb) breakpoint set -E swift --exception-typename MyError
```
would create a breakpoint that stopped for **any** Swift exception.
The fix is a one-line fix, changing the way `m_exception_extra_args` is constructed in `CommandObjectBreakpoint`. These args are consumed in [`SwiftExceptionPrecondition::ConfigurePrecondition`](https://github.com/apple/llvm-project/blob/9509716734619d7299d296cb175e5d50f1d0a857/lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp#L1524-L1531).
Most of the changes included in this PR are to refactor the associated unit tests. The tests had been creating the exception breakpoint via SB API, not via command line which is why this bug wasn't caught by the tests. The tests have been updated to create exception breakpoints via both API and CLI. While editing the tests, I cleaned them up too.
I also deleted a duplicate and commented-out definition of `breakpoint_set_exception_typename` in `Commands/Options.td`.
rdar://75959015
(cherry picked from commit 0a70434)
0 commit comments