From 7cdd713a3b782463bc2da8cc2f1846a384b859b6 Mon Sep 17 00:00:00 2001 From: Igor Kulaychuk Date: Mon, 17 Jul 2017 02:29:21 +0300 Subject: [PATCH] Enable handling -f argument in break-insert command --- src/debug/netcoredbg/commands.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/debug/netcoredbg/commands.cpp b/src/debug/netcoredbg/commands.cpp index d5d67a3..0aa1ff1 100644 --- a/src/debug/netcoredbg/commands.cpp +++ b/src/debug/netcoredbg/commands.cpp @@ -118,11 +118,21 @@ static bool GetIndices(const std::vector &args, int &index1, int &i return true; } -bool ParseBreakpoint(const std::vector &args, std::string &filename, unsigned int &linenum) +bool ParseBreakpoint(const std::vector &args_orig, std::string &filename, unsigned int &linenum) { + std::vector 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) -- 2.7.4