#include "lldb/Interpreter/OptionGroupPythonClassWithDict.h"
#include "lldb/Target/Target.h"
-
using namespace lldb;
using namespace lldb_private;
// to set or collect command callback. Otherwise, call the methods
// associated with this object.
if (m_options.m_use_script_language) {
- ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter();
+ ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter(
+ /*can_create=*/true, m_options.m_script_language);
// Special handling for one-liner specified inline.
if (m_options.m_use_one_liner) {
script_interp->SetBreakpointCommandCallback(
--- /dev/null
+# REQUIRES: python
+#
+# Test that the scripting language argument to "breakpoint command" is honored
+# even if the global scripting language is different.
+#
+# RUN: cat %s | %lldb --script-language none 2>&1 | FileCheck %s
+b main
+breakpoint command add -s python
+print("foo")
+DONE
+# CHECK: Enter your Python command(s). Type 'DONE' to end.