[lldb/Commands] Use the default scripting langauge for BP functions
authorJonas Devlieghere <jonas@devlieghere.com>
Sun, 22 Dec 2019 02:11:40 +0000 (18:11 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Sun, 22 Dec 2019 02:12:37 +0000 (18:12 -0800)
When a function is used as a breakpoint command, use to the debugger's
default scripting language, unless a language is explicitly specified.

lldb/source/Commands/CommandObjectBreakpointCommand.cpp

index 73153cf..d62fe51 100644 (file)
@@ -375,7 +375,10 @@ protected:
 
     if (!m_func_options.GetName().empty()) {
       m_options.m_use_one_liner = false;
-      m_options.m_use_script_language = true;
+      if (!m_options.m_use_script_language) {
+        m_options.m_script_language = GetDebugger().GetScriptLanguage();
+        m_options.m_use_script_language = true;
+      }
     }
 
     BreakpointIDList valid_bp_ids;