Skip to content

Commit 7a0af7b

Browse files
committed
[lldb][lldb-dap] Cleanup breakpoint filters.
Details: - remove Swift breakpoint filter because this version of LLDB does not support Swift. - only return objc filters when working on macos.
1 parent 899855d commit 7a0af7b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ DAP::DAP()
3636
{{"cpp_catch", "C++ Catch", lldb::eLanguageTypeC_plus_plus},
3737
{"cpp_throw", "C++ Throw", lldb::eLanguageTypeC_plus_plus},
3838
{"objc_catch", "Objective-C Catch", lldb::eLanguageTypeObjC},
39-
{"objc_throw", "Objective-C Throw", lldb::eLanguageTypeObjC},
40-
{"swift_catch", "Swift Catch", lldb::eLanguageTypeSwift},
41-
{"swift_throw", "Swift Throw", lldb::eLanguageTypeSwift}}),
39+
{"objc_throw", "Objective-C Throw", lldb::eLanguageTypeObjC}}),
4240
focus_tid(LLDB_INVALID_THREAD_ID), sent_terminated_event(false),
4341
stop_at_entry(false), is_attach(false),
4442
enable_auto_variable_summaries(false),

lldb/tools/lldb-dap/lldb-dap.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,14 @@ void request_initialize(const llvm::json::Object &request) {
16281628
body.try_emplace("supportsEvaluateForHovers", true);
16291629
// Available filters or options for the setExceptionBreakpoints request.
16301630
llvm::json::Array filters;
1631+
std::string triple =
1632+
std::string(g_dap.debugger.GetSelectedPlatform().GetTriple());
16311633
for (const auto &exc_bp : g_dap.exception_breakpoints) {
1634+
// Skipping objc breakpoint filters if not working on macos.
1635+
if (exc_bp.language == lldb::eLanguageTypeObjC &&
1636+
triple.find("macos") == std::string::npos) {
1637+
continue;
1638+
}
16321639
filters.emplace_back(CreateExceptionBreakpointFilter(exc_bp));
16331640
}
16341641
body.try_emplace("exceptionBreakpointFilters", std::move(filters));

0 commit comments

Comments
 (0)