Enable handling -f argument in break-insert command
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Sun, 16 Jul 2017 23:29:21 +0000 (02:29 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 13 Nov 2017 19:22:40 +0000 (22:22 +0300)
src/debug/netcoredbg/commands.cpp

index d5d67a3..0aa1ff1 100644 (file)
@@ -118,11 +118,21 @@ static bool GetIndices(const std::vector<std::string> &args, int &index1, int &i
     return true;
 }
 
-bool ParseBreakpoint(const std::vector<std::string> &args, std::string &filename, unsigned int &linenum)
+bool ParseBreakpoint(const std::vector<std::string> &args_orig, std::string &filename, unsigned int &linenum)
 {
+    std::vector<std::string> args = args_orig;
+    StripArgs(args);
+
     if (args.empty())
         return false;
 
+    if (args.at(0) == "-f")
+    {
+        args.erase(args.begin());
+        if (args.empty())
+            return false;
+    }
+
     std::size_t i = args.at(0).rfind(':');
 
     if (i == std::string::npos)