Author: Jonas Devlieghere
Date: 2019-12-21T18:12:37-08:00
New Revision: 1ff01cfe3ea51f873ff91ed66e1b8157583c6aa1

URL: 
https://github.com/llvm/llvm-project/commit/1ff01cfe3ea51f873ff91ed66e1b8157583c6aa1
DIFF: 
https://github.com/llvm/llvm-project/commit/1ff01cfe3ea51f873ff91ed66e1b8157583c6aa1.diff

LOG: [lldb/Commands] Use the default scripting langauge for BP functions

When a function is used as a breakpoint command, use to the debugger's
default scripting language, unless a language is explicitly specified.

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectBreakpointCommand.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp 
b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 73153cf6329d..d62fe519eca5 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -375,7 +375,10 @@ are no syntax errors may indicate that a function was 
declared but never called.
 
     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;


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to