mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Reapply PR/87550 (#94625)
Re-apply https://github.com/llvm/llvm-project/pull/87550 with fixes. Details: Some tests in fuchsia failed because of the newly added assertion. This was because `GetExceptionBreakpoint()` could be called before `g_dap.debugger` was initted. The fix here is to just lazily populate the list in GetExceptionBreakpoint() rather than assuming it's already been initted. (There is some nuisance here because we can't simply just populate it in DAP::DAP(), which is a global ctor and is called before `SBDebugger::Initialize()` is called. )
This commit is contained in:
@@ -1742,3 +1742,7 @@ bool SBDebugger::InterruptRequested() {
|
||||
return m_opaque_sp->InterruptRequested();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SBDebugger::SupportsLanguage(lldb::LanguageType language) {
|
||||
return TypeSystem::SupportsLanguageStatic(language);
|
||||
}
|
||||
|
||||
@@ -335,3 +335,14 @@ TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
|
||||
}
|
||||
return GetTypeSystemForLanguage(language);
|
||||
}
|
||||
|
||||
bool TypeSystem::SupportsLanguageStatic(lldb::LanguageType language) {
|
||||
if (language == eLanguageTypeUnknown)
|
||||
return false;
|
||||
|
||||
LanguageSet languages =
|
||||
PluginManager::GetAllTypeSystemSupportedLanguagesForTypes();
|
||||
if (languages.Empty())
|
||||
return false;
|
||||
return languages[language];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user