virtual void IOHandlerInputComplete (IOHandler &io_handler, std::string &line) { io_handler.SetIsDone(true); // The WatchpointOptions object is owned by the watchpoint or watchpoint location WatchpointOptions *wp_options = (WatchpointOptions *) io_handler.GetUserData(); if (wp_options) { std::unique_ptr<WatchpointOptions::CommandData> data_ap(new WatchpointOptions::CommandData()); if (data_ap.get()) { data_ap->user_source.SplitIntoLines(line); BatonSP baton_sp (new WatchpointOptions::CommandBaton (data_ap.release())); wp_options->SetCallback (WatchpointOptionsCallbackFunction, baton_sp); } } }
void IOHandlerInputComplete (IOHandler &io_handler, std::string &line) override { io_handler.SetIsDone(true); std::vector<BreakpointOptions *> *bp_options_vec = (std::vector<BreakpointOptions *> *)io_handler.GetUserData(); for (BreakpointOptions *bp_options : *bp_options_vec) { if (!bp_options) continue; std::unique_ptr<BreakpointOptions::CommandData> data_ap(new BreakpointOptions::CommandData()); if (data_ap.get()) { data_ap->user_source.SplitIntoLines (line.c_str(), line.size()); BatonSP baton_sp (new BreakpointOptions::CommandBaton (data_ap.release())); bp_options->SetCallback (BreakpointOptionsCallbackFunction, baton_sp); } } }