diff --git a/tooling/base/pt_params.cpp b/tooling/base/pt_params.cpp index 6eaf6f0261199d87dbb1428339f11d225e501241..15e4bc23f7cf9919d2cbc2f90f3b33017a5eec71 100644 --- a/tooling/base/pt_params.cpp +++ b/tooling/base/pt_params.cpp @@ -108,6 +108,36 @@ std::unique_ptr EvaluateOnCallFrameParams::Create(con return paramsObject; } +std::unique_ptr ContinueToLocationParams::Create(const PtJson ¶ms) +{ + auto paramsObject = std::make_unique(); + std::string error; + Result ret; + + std::unique_ptr location; + ret = params.GetObject("location", &location); + if (ret == Result::SUCCESS) { + std::unique_ptr locations = Location::Create(*location); + if (locations == nullptr) { + error += "Unknown 'location';"; + } else { + paramsObject->location_ = std::move(locations); + } + } else { + error += "Unknown 'location';"; + } + + std::string targetCallFrames; + ret = params.GetString("targetCallFrames", &targetCallFrames); + if (ret == Result::SUCCESS) { + paramsObject->targetCallFrames_ = std::move(targetCallFrames); + } else { + error += "Unknown 'targetCallFrames';"; + } + + return paramsObject; +} + std::unique_ptr GetPossibleBreakpointsParams::Create(const PtJson ¶ms) { auto paramsObject = std::make_unique(); diff --git a/tooling/base/pt_params.h b/tooling/base/pt_params.h index 01fac0af4e29adc267475fd579929c2a72a43592..1de471ee4d27d3acf7709f5be802c3a598effc58 100644 --- a/tooling/base/pt_params.h +++ b/tooling/base/pt_params.h @@ -33,6 +33,30 @@ private: NO_MOVE_SEMANTIC(PtBaseParams); }; +class ContinueToLocationParams : public PtBaseParams { +public: + ContinueToLocationParams() = default; + ~ContinueToLocationParams() override = default; + + static std::unique_ptr Create(const PtJson ¶ms); + Location *GetLocations() const + { + return location_.get(); + } + + const std::string &GetTargetCallFrames() const + { + return targetCallFrames_; + } + + private: + NO_COPY_SEMANTIC(ContinueToLocationParams); + NO_MOVE_SEMANTIC(ContinueToLocationParams); + + std::unique_ptr location_ {nullptr}; + std::string targetCallFrames_ {}; +}; + class EnableParams : public PtBaseParams { public: EnableParams() = default;