[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 9 10:24:13 PDT 2024
================
@@ -26,3 +26,43 @@ SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType language) {
return Language::GetNameForLanguageType(language);
}
+
+bool SBLanguageRuntime::LanguageIsCPlusPlus(lldb::LanguageType language) {
+ return Language::LanguageIsCPlusPlus(language);
+}
+
+bool SBLanguageRuntime::LanguageIsObjC(lldb::LanguageType language) {
+ return Language::LanguageIsObjC(language);
+}
+
+bool SBLanguageRuntime::LanguageIsCFamily(lldb::LanguageType language) {
+ return Language::LanguageIsCFamily(language);
+}
+
+bool SBLanguageRuntime::SupportsExceptionBreakpointsOnThrow(
+ lldb::LanguageType language) {
+ if (Language *lang_plugin = Language::FindPlugin(language))
+ return lang_plugin->SupportsExceptionBreakpointsOnThrow();
+ return false;
+}
+
+bool SBLanguageRuntime::SupportsExceptionBreakpointsOnCatch(
+ lldb::LanguageType language) {
+ if (Language *lang_plugin = Language::FindPlugin(language))
+ return lang_plugin->SupportsExceptionBreakpointsOnCatch();
+ return false;
+}
+
+const char *
+SBLanguageRuntime::GetThrowKeywordForLanguage(lldb::LanguageType language) {
+ if (Language *lang_plugin = Language::FindPlugin(language))
+ return ConstString(lang_plugin->GetThrowKeyword().data()).AsCString();
----------------
bulbazord wrote:
Shouldn't need to do `.data()` at the end there. `ConstString::ConstString` can accept `llvm::StringRef` as an argument, and even better it doesn't have to re-calculate the length of the string when you do so.
https://github.com/llvm/llvm-project/pull/97871
More information about the lldb-commits
mailing list