[Lldb-commits] [lldb] [lldb][lldb-dap] Cleanup breakpoint filters. (PR #87550)

Vy Nguyen via lldb-commits lldb-commits at lists.llvm.org
Fri May 24 06:21:46 PDT 2024


oontvoo wrote:

> I would be nice if we can detect if we support Swift dynamically. Internally in LLDB, we can ask for a TypeSystem by language using:
> 
> ```
> llvm::Expected<lldb::TypeSystemSP>
> TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
>                                         Module *module, bool can_create);
> llvm::Expected<lldb::TypeSystemSP>
> TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
>                                         Target *target, bool can_create);
> ```
> 
> These functions will return respectively:
> 
> ```
> TypeSystem::CreateInstance(language, module);
> TypeSystem::CreateInstance(language, target);
> ```
> 
> We should be able to add a new static method to the TypeSystem.h/.cpp that can answer if a language is supported with something like:
> 
> ```
> static bool TypeSystem::SupportsLanguage(lldb::LanguageType language);
> ```
> 
> Each TypeSystem plugin can register a new callback that can answer if they support a language. Then we can add a static function on SBDebugger that would expose this function with something like:
> 
> ```
> static bool SBDebugger::SupportsLanguage(lldb::LanguageType language);
> ```
> 
> I will make comments in the DAP.cpp where this would be used.

Done!

https://github.com/llvm/llvm-project/pull/87550


More information about the lldb-commits mailing list