aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectBreakpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 661ebc7..e62a115 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -622,6 +622,14 @@ protected:
result.AppendErrorWithFormat(
"Function name regular expression could not be compiled: %s",
llvm::toString(std::move(err)).c_str());
+ // Check if the incorrect regex looks like a globbing expression and
+ // warn the user about it.
+ if (!m_options.m_func_regexp.empty()) {
+ if (m_options.m_func_regexp[0] == '*' ||
+ m_options.m_func_regexp[0] == '?')
+ result.AppendWarning(
+ "Function name regex does not accept glob patterns.");
+ }
result.SetStatus(eReturnStatusFailed);
return false;
}