aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp17
-rw-r--r--lldb/source/Commands/Options.td6
2 files changed, 22 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 2440a7e..38ec375 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -72,7 +72,7 @@ public:
case 'c':
// Normally an empty breakpoint condition marks is as unset. But we need
// to say it was passed in.
- m_bp_opts.SetCondition(option_arg.str().c_str());
+ m_bp_opts.GetCondition().SetText(option_arg.str());
m_bp_opts.m_set_flags.Set(BreakpointOptions::eCondition);
break;
case 'C':
@@ -154,6 +154,21 @@ public:
m_bp_opts.GetThreadSpec()->SetIndex(thread_index);
}
} break;
+ case 'Y': {
+ LanguageType language = Language::GetLanguageTypeFromString(option_arg);
+
+ LanguageSet languages_for_expressions =
+ Language::GetLanguagesSupportingTypeSystemsForExpressions();
+ if (language == eLanguageTypeUnknown)
+ error = Status::FromError(CreateOptionParsingError(
+ option_arg, short_option, long_option, "invalid language"));
+ else if (!languages_for_expressions[language])
+ error = Status::FromError(
+ CreateOptionParsingError(option_arg, short_option, long_option,
+ "no expression support for language"));
+ else
+ m_bp_opts.GetCondition().SetLanguage(language);
+ } break;
default:
llvm_unreachable("Unimplemented option");
}
diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td
index e543566..acb7410 100644
--- a/lldb/source/Commands/Options.td
+++ b/lldb/source/Commands/Options.td
@@ -95,6 +95,12 @@ let Command = "breakpoint modify" in {
def breakpoint_modify_condition : Option<"condition", "c">, Group<1>,
Arg<"Expression">, Desc<"The breakpoint stops only if this condition "
"expression evaluates to true.">;
+ def breakpoint_modify_condition_language
+ : Option<"condition-language", "Y">,
+ Group<1>,
+ Arg<"Language">,
+ Desc<"Specifies the Language to use when executing the breakpoint's "
+ "condition expression.">;
def breakpoint_modify_auto_continue : Option<"auto-continue", "G">, Group<1>,
Arg<"Boolean">,
Desc<"The breakpoint will auto-continue after running its commands.">;