[Lldb-commits] [lldb] [lldb] Expose language plugin commands based based on language of current frame (PR #136766)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Thu May 1 12:24:53 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()) {
----------------
kastiglione wrote:

done (and I added other early returns)

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


More information about the lldb-commits mailing list