[Lldb-commits] [lldb] [lldb] Expose language plugin commands based based on language of current frame (PR #136766)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 24 12:47:04 PDT 2025
================
@@ -1018,6 +1018,26 @@ CommandInterpreter::VerifyUserMultiwordCmdPath(Args &path, bool leaf_is_command,
return cur_as_multi;
}
+CommandObjectSP CommandInterpreter::GetFrameLanguageCommand() const {
+ if (auto frame_sp = GetExecutionContext().GetFrameSP()) {
+ auto frame_language = Language::GetPrimaryLanguage(
+ frame_sp->GuessLanguage().AsLanguageType());
+
+ auto it = m_command_dict.find("language");
+ if (it != m_command_dict.end()) {
----------------
adrian-prantl wrote:
```suggestion
if (it == m_command_dict.end())
return {};
```
https://github.com/llvm/llvm-project/pull/136766
More information about the lldb-commits
mailing list