From 5f75fbcf69300f53d776351896b306e0cbc358f6 Mon Sep 17 00:00:00 2001 From: Herman Venter Date: Thu, 23 May 2013 20:20:35 -0700 Subject: [PATCH] Restore syntax for specifying a breakpoint using only a line number. The special case got over looked in the recent breakpoint parser rewrite. This change is a small point fix that restores this functionality while perturbing as little else as possible. --- hphp/runtime/eval/debugger/break_point.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hphp/runtime/eval/debugger/break_point.cpp b/hphp/runtime/eval/debugger/break_point.cpp index d72c82314..7d7ec2b53 100644 --- a/hphp/runtime/eval/debugger/break_point.cpp +++ b/hphp/runtime/eval/debugger/break_point.cpp @@ -639,9 +639,16 @@ void BreakPointInfo::parseBreakPointReached(const std::string &exp, string name; auto len = exp.length(); auto offset0 = 0; + //Look for leading number by itself + auto offset1 = scanNumber(exp, offset0, m_line1); + if (offset1 == len) { + m_line2 = m_line1; + m_file = file; + return; + } // Skip over a leading backslash if (len > 0 && exp[0] == '\\') offset0++; - auto offset1 = scanName(exp, offset0); + offset1 = scanName(exp, offset0); // check that exp starts with a file or method name if (offset1 == offset0) goto returnInvalid; name = exp.substr(offset0, offset1-offset0);