Skip to content

Commit 3bfc516

Browse files
author
walter erquinigo
committed
[lldb-dap][NFC] Minor rename
As a minor follow up for #97675, I'm renaming `SupportsExceptionBreakpoints` to `SupportsExceptionBreakpointsOnThrow` and adding a `SupportsExceptionBreakpointsOnCatch` to have a bit of more granularity.
1 parent 6c1c97c commit 3bfc516

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

lldb/include/lldb/Target/Language.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,13 @@ class Language : public PluginInterface {
363363
return false;
364364
}
365365

366-
/// Returns true if this Language supports exception breakpoints via a
367-
/// corresponding LanguageRuntime plugin.
368-
virtual bool SupportsExceptionBreakpoints() const { return false; }
366+
/// Returns true if this Language supports exception breakpoints on throw via
367+
/// a corresponding LanguageRuntime plugin.
368+
virtual bool SupportsExceptionBreakpointsOnThrow() const { return false; }
369+
370+
/// Returns true if this Language supports exception breakpoints on catch via
371+
/// a corresponding LanguageRuntime plugin.
372+
virtual bool SupportsExceptionBreakpointsOnCatch() const { return false; }
369373

370374
protected:
371375
// Classes that inherit from Language can see and modify these

lldb/source/Commands/CommandObjectBreakpoint.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
317317
break;
318318
default:
319319
if (Language *languagePlugin = Language::FindPlugin(language)) {
320-
if (languagePlugin->SupportsExceptionBreakpoints()) {
320+
if (languagePlugin->SupportsExceptionBreakpointsOnThrow() ||
321+
languagePlugin->SupportsExceptionBreakpointsOnCatch()) {
321322
m_exception_language = language;
322323
break;
323324
}

lldb/source/Plugins/Language/ObjC/ObjCLanguage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class ObjCLanguage : public Language {
194194

195195
llvm::StringRef GetInstanceVariableName() override { return "self"; }
196196

197-
bool SupportsExceptionBreakpoints() const override { return true; }
197+
bool SupportsExceptionBreakpointsOnThrow() const override { return true; }
198198

199199
// PluginInterface protocol
200200
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }

0 commit comments

Comments
 (0)