Lines Matching +full:no +full:- +full:wp
1 //===-- CommandObjectWatchpointCommand.cpp --------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
44 ------------------------------------------------------
55 do not appear to be executing, double-check the command syntax."
60 prompt. There is no limit to the number of commands supplied, but do NOT enter \
65 ----------------------------------------------------
75 This auto-generated function is passed in three arguments:
79 wp: the watchpoint that was hit.
82 "When specifying a python function with the --python-function option, you need \
86 --python-function myutils.watchpoint_callback
90 def watchpoint_callback(frame, wp):
108 Example Python one-line watchpoint command:
110 (lldb) watchpoint command add -s python 1
115 As a convenience, this also works for a short Python one-liner:
117 (lldb) watchpoint command add -s python 1 -o 'import time; print time.asctime()'
122 * thread #1: tid = 0x2e03, 0x0000000100000de8 a.out`c + 7 at main.c:39, stop reason = watchpoint 1.1, queue = com.apple.main-thread
126 39 -> return val + 3;
133 (lldb) watchpoint command add -s python 1
144 (lldb) watchpoint command add -s p 1
162 "Final Note: A warning that no watchpoint command was generated when there \
163 are no syntax errors may indicate that a function was declared but never called.");
175 output_sp->PutCString(
177 output_sp->Flush();
193 data_up->user_source.SplitIntoLines(line);
196 wp_options->SetCallback(WatchpointOptionsCallbackFunction, baton_sp);
210 /// Set a one-liner as the callback for the watchpoint.
220 data_up->user_source.AppendString(oneliner);
221 data_up->script_source.assign(oneliner);
222 data_up->stop_on_error = m_options.m_stop_on_error;
226 wp_options->SetCallback(WatchpointOptionsCallbackFunction, baton_sp);
239 StringList &commands = data->user_source;
242 ExecutionContext exe_ctx(context->exe_ctx_ref);
245 Debugger &debugger = target->GetDebugger();
258 options.SetStopOnError(data->stop_on_error);
266 result.GetImmediateOutputStream()->Flush();
267 result.GetImmediateErrorStream()->Flush();
313 "invalid value for stop-on-error: \"%s\"",
360 const WatchpointList &watchpoints = target->GetWatchpointList();
364 result.AppendError("No watchpoints exist to have commands added");
387 Watchpoint *wp = target->GetWatchpointList().FindByID(cur_wp_id).get();
388 // Sanity check wp first.
389 if (wp == nullptr)
392 WatchpointOptions *wp_options = wp->GetOptions();
403 // Special handling for one-liner specified inline.
405 script_interp->SetWatchpointCommandCallback(
415 function_signature += "(frame, wp, internal_dict)";
416 script_interp->SetWatchpointCommandCallback(
419 script_interp->CollectDataForWatchpointCommandCallback(wp_options,
423 // Special handling for one-liner specified inline.
455 const WatchpointList &watchpoints = target->GetWatchpointList();
459 result.AppendError("No watchpoints exist to have commands deleted");
465 "No watchpoint specified from which to delete the commands");
481 Watchpoint *wp = target->GetWatchpointList().FindByID(cur_wp_id).get();
482 if (wp)
483 wp->ClearCallback();
510 const WatchpointList &watchpoints = target->GetWatchpointList();
514 result.AppendError("No watchpoints exist for which to list commands");
520 "No watchpoint specified for which to list the commands");
536 Watchpoint *wp = target->GetWatchpointList().FindByID(cur_wp_id).get();
538 if (wp) {
539 const WatchpointOptions *wp_options = wp->GetOptions();
542 const Baton *baton = wp_options->GetBaton();
545 baton->GetDescription(result.GetOutputStream().AsRawOstream(),
573 "command <sub-command> [<sub-command-options>] <watchpoint-id>") {
581 add_command_object->SetCommandName("watchpoint command add");
582 delete_command_object->SetCommandName("watchpoint command delete");
583 list_command_object->SetCommandName("watchpoint command list");