LLDB  mainline
StopInfo.cpp
Go to the documentation of this file.
1 //===-- StopInfo.cpp ------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include <string>
10 
15 #include "lldb/Core/Debugger.h"
16 #include "lldb/Core/ValueObject.h"
18 #include "lldb/Target/Process.h"
19 #include "lldb/Target/StopInfo.h"
20 #include "lldb/Target/Target.h"
21 #include "lldb/Target/Thread.h"
22 #include "lldb/Target/ThreadPlan.h"
24 #include "lldb/Utility/Log.h"
26 
27 using namespace lldb;
28 using namespace lldb_private;
29 
30 StopInfo::StopInfo(Thread &thread, uint64_t value)
31  : m_thread_wp(thread.shared_from_this()),
32  m_stop_id(thread.GetProcess()->GetStopID()),
33  m_resume_id(thread.GetProcess()->GetResumeID()), m_value(value),
34  m_description(), m_override_should_notify(eLazyBoolCalculate),
35  m_override_should_stop(eLazyBoolCalculate), m_extended_info() {}
36 
37 bool StopInfo::IsValid() const {
38  ThreadSP thread_sp(m_thread_wp.lock());
39  if (thread_sp)
40  return thread_sp->GetProcess()->GetStopID() == m_stop_id;
41  return false;
42 }
43 
45  ThreadSP thread_sp(m_thread_wp.lock());
46  if (thread_sp) {
47  m_stop_id = thread_sp->GetProcess()->GetStopID();
48  m_resume_id = thread_sp->GetProcess()->GetResumeID();
49  }
50 }
51 
53  ThreadSP thread_sp(m_thread_wp.lock());
54 
55  if (thread_sp) {
56  lldb::StateType ret_type = thread_sp->GetProcess()->GetPrivateState();
57  if (ret_type == eStateRunning) {
58  return true;
59  } else if (ret_type == eStateStopped) {
60  // This is a little tricky. We want to count "run and stopped again
61  // before you could ask this question as a "TRUE" answer to
62  // HasTargetRunSinceMe. But we don't want to include any running of the
63  // target done for expressions. So we track both resumes, and resumes
64  // caused by expressions, and check if there are any resumes
65  // NOT caused
66  // by expressions.
67 
68  uint32_t curr_resume_id = thread_sp->GetProcess()->GetResumeID();
69  uint32_t last_user_expression_id =
70  thread_sp->GetProcess()->GetLastUserExpressionResumeID();
71  if (curr_resume_id == m_resume_id) {
72  return false;
73  } else if (curr_resume_id > last_user_expression_id) {
74  return true;
75  }
76  }
77  }
78  return false;
79 }
80 
81 // StopInfoBreakpoint
82 
83 namespace lldb_private {
84 class StopInfoBreakpoint : public StopInfo {
85 public:
87  : StopInfo(thread, break_id), m_should_stop(false),
90  m_was_one_shot(false) {
91  StoreBPInfo();
92  }
93 
94  StopInfoBreakpoint(Thread &thread, break_id_t break_id, bool should_stop)
95  : StopInfo(thread, break_id), m_should_stop(should_stop),
98  m_was_one_shot(false) {
99  StoreBPInfo();
100  }
101 
102  ~StopInfoBreakpoint() override = default;
103 
104  void StoreBPInfo() {
105  ThreadSP thread_sp(m_thread_wp.lock());
106  if (thread_sp) {
107  BreakpointSiteSP bp_site_sp(
108  thread_sp->GetProcess()->GetBreakpointSiteList().FindByID(m_value));
109  if (bp_site_sp) {
110  if (bp_site_sp->GetNumberOfOwners() == 1) {
111  BreakpointLocationSP bp_loc_sp = bp_site_sp->GetOwnerAtIndex(0);
112  if (bp_loc_sp) {
113  m_break_id = bp_loc_sp->GetBreakpoint().GetID();
114  m_was_one_shot = bp_loc_sp->GetBreakpoint().IsOneShot();
115  }
116  }
117  m_address = bp_site_sp->GetLoadAddress();
118  }
119  }
120  }
121 
122  bool IsValidForOperatingSystemThread(Thread &thread) override {
123  ProcessSP process_sp(thread.GetProcess());
124  if (process_sp) {
125  BreakpointSiteSP bp_site_sp(
126  process_sp->GetBreakpointSiteList().FindByID(m_value));
127  if (bp_site_sp)
128  return bp_site_sp->ValidForThisThread(thread);
129  }
130  return false;
131  }
132 
133  StopReason GetStopReason() const override { return eStopReasonBreakpoint; }
134 
135  bool ShouldStopSynchronous(Event *event_ptr) override {
136  ThreadSP thread_sp(m_thread_wp.lock());
137  if (thread_sp) {
138  if (!m_should_stop_is_valid) {
139  // Only check once if we should stop at a breakpoint
140  BreakpointSiteSP bp_site_sp(
141  thread_sp->GetProcess()->GetBreakpointSiteList().FindByID(m_value));
142  if (bp_site_sp) {
143  ExecutionContext exe_ctx(thread_sp->GetStackFrameAtIndex(0));
144  StoppointCallbackContext context(event_ptr, exe_ctx, true);
145  bp_site_sp->BumpHitCounts();
146  m_should_stop = bp_site_sp->ShouldStop(&context);
147  } else {
149 
150  LLDB_LOGF(log,
151  "Process::%s could not find breakpoint site id: %" PRId64
152  "...",
153  __FUNCTION__, m_value);
154 
155  m_should_stop = true;
156  }
157  m_should_stop_is_valid = true;
158  }
159  return m_should_stop;
160  }
161  return false;
162  }
163 
164  bool DoShouldNotify(Event *event_ptr) override {
165  ThreadSP thread_sp(m_thread_wp.lock());
166  if (thread_sp) {
167  BreakpointSiteSP bp_site_sp(
168  thread_sp->GetProcess()->GetBreakpointSiteList().FindByID(m_value));
169  if (bp_site_sp) {
170  bool all_internal = true;
171 
172  for (uint32_t i = 0; i < bp_site_sp->GetNumberOfOwners(); i++) {
173  if (!bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint().IsInternal()) {
174  all_internal = false;
175  break;
176  }
177  }
178  return !all_internal;
179  }
180  }
181  return true;
182  }
183 
184  const char *GetDescription() override {
185  if (m_description.empty()) {
186  ThreadSP thread_sp(m_thread_wp.lock());
187  if (thread_sp) {
188  BreakpointSiteSP bp_site_sp(
189  thread_sp->GetProcess()->GetBreakpointSiteList().FindByID(m_value));
190  if (bp_site_sp) {
191  StreamString strm;
192  // If we have just hit an internal breakpoint, and it has a kind
193  // description, print that instead of the full breakpoint printing:
194  if (bp_site_sp->IsInternal()) {
195  size_t num_owners = bp_site_sp->GetNumberOfOwners();
196  for (size_t idx = 0; idx < num_owners; idx++) {
197  const char *kind = bp_site_sp->GetOwnerAtIndex(idx)
198  ->GetBreakpoint()
199  .GetBreakpointKind();
200  if (kind != nullptr) {
201  m_description.assign(kind);
202  return kind;
203  }
204  }
205  }
206 
207  strm.Printf("breakpoint ");
208  bp_site_sp->GetDescription(&strm, eDescriptionLevelBrief);
210  } else {
211  StreamString strm;
213  BreakpointSP break_sp =
214  thread_sp->GetProcess()->GetTarget().GetBreakpointByID(
215  m_break_id);
216  if (break_sp) {
217  if (break_sp->IsInternal()) {
218  const char *kind = break_sp->GetBreakpointKind();
219  if (kind)
220  strm.Printf("internal %s breakpoint(%d).", kind, m_break_id);
221  else
222  strm.Printf("internal breakpoint(%d).", m_break_id);
223  } else {
224  strm.Printf("breakpoint %d.", m_break_id);
225  }
226  } else {
227  if (m_was_one_shot)
228  strm.Printf("one-shot breakpoint %d", m_break_id);
229  else
230  strm.Printf("breakpoint %d which has been deleted.",
231  m_break_id);
232  }
233  } else if (m_address == LLDB_INVALID_ADDRESS)
234  strm.Printf("breakpoint site %" PRIi64
235  " which has been deleted - unknown address",
236  m_value);
237  else
238  strm.Printf("breakpoint site %" PRIi64
239  " which has been deleted - was at 0x%" PRIx64,
240  m_value, m_address);
241 
243  }
244  }
245  }
246  return m_description.c_str();
247  }
248 
249 protected:
250  bool ShouldStop(Event *event_ptr) override {
251  // This just reports the work done by PerformAction or the synchronous
252  // stop. It should only ever get called after they have had a chance to
253  // run.
254  assert(m_should_stop_is_valid);
255  return m_should_stop;
256  }
257 
258  void PerformAction(Event *event_ptr) override {
260  return;
261  m_should_perform_action = false;
262  bool internal_breakpoint = true;
263 
264  ThreadSP thread_sp(m_thread_wp.lock());
265 
266  if (thread_sp) {
269 
270  if (!thread_sp->IsValid()) {
271  // This shouldn't ever happen, but just in case, don't do more harm.
272  if (log) {
273  LLDB_LOGF(log, "PerformAction got called with an invalid thread.");
274  }
275  m_should_stop = true;
276  m_should_stop_is_valid = true;
277  return;
278  }
279 
280  BreakpointSiteSP bp_site_sp(
281  thread_sp->GetProcess()->GetBreakpointSiteList().FindByID(m_value));
282  std::unordered_set<break_id_t> precondition_breakpoints;
283 
284  if (bp_site_sp) {
285  // Let's copy the owners list out of the site and store them in a local
286  // list. That way if one of the breakpoint actions changes the site,
287  // then we won't be operating on a bad list.
288  BreakpointLocationCollection site_locations;
289  size_t num_owners = bp_site_sp->CopyOwnersList(site_locations);
290 
291  if (num_owners == 0) {
292  m_should_stop = true;
293  } else {
294  // We go through each location, and test first its precondition -
295  // this overrides everything. Note, we only do this once per
296  // breakpoint - not once per location... Then check the condition.
297  // If the condition says to stop, then we run the callback for that
298  // location. If that callback says to stop as well, then we set
299  // m_should_stop to true; we are going to stop. But we still want to
300  // give all the breakpoints whose conditions say we are going to stop
301  // a chance to run their callbacks. Of course if any callback
302  // restarts the target by putting "continue" in the callback, then
303  // we're going to restart, without running the rest of the callbacks.
304  // And in this case we will end up not stopping even if another
305  // location said we should stop. But that's better than not running
306  // all the callbacks.
307 
308  // There's one other complication here. We may have run an async
309  // breakpoint callback that said we should stop. We only want to
310  // override that if another breakpoint action says we shouldn't
311  // stop. If nobody else has an opinion, then we should stop if the
312  // async callback says we should. An example of this is the async
313  // shared library load notification breakpoint and the setting
314  // stop-on-sharedlibrary-events.
315  // We'll keep the async value in async_should_stop, and track whether
316  // anyone said we should NOT stop in actually_said_continue.
317  bool async_should_stop = false;
319  async_should_stop = m_should_stop;
320  bool actually_said_continue = false;
321 
322  m_should_stop = false;
323 
324  // We don't select threads as we go through them testing breakpoint
325  // conditions and running commands. So we need to set the thread for
326  // expression evaluation here:
327  ThreadList::ExpressionExecutionThreadPusher thread_pusher(thread_sp);
328 
329  ExecutionContext exe_ctx(thread_sp->GetStackFrameAtIndex(0));
330  Process *process = exe_ctx.GetProcessPtr();
331  if (process->GetModIDRef().IsLastResumeForUserExpression()) {
332  // If we are in the middle of evaluating an expression, don't run
333  // asynchronous breakpoint commands or expressions. That could
334  // lead to infinite recursion if the command or condition re-calls
335  // the function with this breakpoint.
336  // TODO: We can keep a list of the breakpoints we've seen while
337  // running expressions in the nested
338  // PerformAction calls that can arise when the action runs a
339  // function that hits another breakpoint, and only stop running
340  // commands when we see the same breakpoint hit a second time.
341 
342  m_should_stop_is_valid = true;
343 
344  // It is possible that the user has a breakpoint at the same site
345  // as the completed plan had (e.g. user has a breakpoint
346  // on a module entry point, and `ThreadPlanCallFunction` ends
347  // also there). We can't find an internal breakpoint in the loop
348  // later because it was already removed on the plan completion.
349  // So check if the plan was completed, and stop if so.
350  if (thread_sp->CompletedPlanOverridesBreakpoint()) {
351  m_should_stop = true;
352  thread_sp->ResetStopInfo();
353  return;
354  }
355 
356  LLDB_LOGF(log, "StopInfoBreakpoint::PerformAction - Hit a "
357  "breakpoint while running an expression,"
358  " not running commands to avoid recursion.");
359  bool ignoring_breakpoints =
361  if (ignoring_breakpoints) {
362  m_should_stop = false;
363  // Internal breakpoints will always stop.
364  for (size_t j = 0; j < num_owners; j++) {
365  lldb::BreakpointLocationSP bp_loc_sp =
366  bp_site_sp->GetOwnerAtIndex(j);
367  if (bp_loc_sp->GetBreakpoint().IsInternal()) {
368  m_should_stop = true;
369  break;
370  }
371  }
372  } else {
373  m_should_stop = true;
374  }
375  LLDB_LOGF(log,
376  "StopInfoBreakpoint::PerformAction - in expression, "
377  "continuing: %s.",
378  m_should_stop ? "true" : "false");
379  process->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
380  "Warning: hit breakpoint while running function, skipping "
381  "commands and conditions to prevent recursion.\n");
382  return;
383  }
384 
385  StoppointCallbackContext context(event_ptr, exe_ctx, false);
386 
387  // For safety's sake let's also grab an extra reference to the
388  // breakpoint owners of the locations we're going to examine, since
389  // the locations are going to have to get back to their breakpoints,
390  // and the locations don't keep their owners alive. I'm just
391  // sticking the BreakpointSP's in a vector since I'm only using it to
392  // locally increment their retain counts.
393 
394  std::vector<lldb::BreakpointSP> location_owners;
395 
396  for (size_t j = 0; j < num_owners; j++) {
397  BreakpointLocationSP loc(site_locations.GetByIndex(j));
398  location_owners.push_back(loc->GetBreakpoint().shared_from_this());
399  }
400 
401  for (size_t j = 0; j < num_owners; j++) {
402  lldb::BreakpointLocationSP bp_loc_sp = site_locations.GetByIndex(j);
403  StreamString loc_desc;
404  if (log) {
405  bp_loc_sp->GetDescription(&loc_desc, eDescriptionLevelBrief);
406  }
407  // If another action disabled this breakpoint or its location, then
408  // don't run the actions.
409  if (!bp_loc_sp->IsEnabled() ||
410  !bp_loc_sp->GetBreakpoint().IsEnabled())
411  continue;
412 
413  // The breakpoint site may have many locations associated with it,
414  // not all of them valid for this thread. Skip the ones that
415  // aren't:
416  if (!bp_loc_sp->ValidForThisThread(*thread_sp)) {
417  if (log) {
418  LLDB_LOGF(log,
419  "Breakpoint %s hit on thread 0x%llx but it was not "
420  "for this thread, continuing.",
421  loc_desc.GetData(),
422  static_cast<unsigned long long>(thread_sp->GetID()));
423  }
424  continue;
425  }
426 
427  internal_breakpoint = bp_loc_sp->GetBreakpoint().IsInternal();
428 
429  // First run the precondition, but since the precondition is per
430  // breakpoint, only run it once per breakpoint.
431  std::pair<std::unordered_set<break_id_t>::iterator, bool> result =
432  precondition_breakpoints.insert(
433  bp_loc_sp->GetBreakpoint().GetID());
434  if (!result.second)
435  continue;
436 
437  bool precondition_result =
438  bp_loc_sp->GetBreakpoint().EvaluatePrecondition(context);
439  if (!precondition_result) {
440  actually_said_continue = true;
441  continue;
442  }
443  // Next run the condition for the breakpoint. If that says we
444  // should stop, then we'll run the callback for the breakpoint. If
445  // the callback says we shouldn't stop that will win.
446 
447  if (bp_loc_sp->GetConditionText() != nullptr) {
448  Status condition_error;
449  bool condition_says_stop =
450  bp_loc_sp->ConditionSaysStop(exe_ctx, condition_error);
451 
452  if (!condition_error.Success()) {
453  Debugger &debugger = exe_ctx.GetTargetRef().GetDebugger();
454  StreamSP error_sp = debugger.GetAsyncErrorStream();
455  error_sp->Printf("Stopped due to an error evaluating condition "
456  "of breakpoint ");
457  bp_loc_sp->GetDescription(error_sp.get(),
459  error_sp->Printf(": \"%s\"", bp_loc_sp->GetConditionText());
460  error_sp->EOL();
461  const char *err_str =
462  condition_error.AsCString("<Unknown Error>");
463  LLDB_LOGF(log, "Error evaluating condition: \"%s\"\n", err_str);
464 
465  error_sp->PutCString(err_str);
466  error_sp->EOL();
467  error_sp->Flush();
468  } else {
469  LLDB_LOGF(log,
470  "Condition evaluated for breakpoint %s on thread "
471  "0x%llx condition_says_stop: %i.",
472  loc_desc.GetData(),
473  static_cast<unsigned long long>(thread_sp->GetID()),
474  condition_says_stop);
475  if (!condition_says_stop) {
476  // We don't want to increment the hit count of breakpoints if
477  // the condition fails. We've already bumped it by the time
478  // we get here, so undo the bump:
479  bp_loc_sp->UndoBumpHitCount();
480  actually_said_continue = true;
481  continue;
482  }
483  }
484  }
485 
486  // We've done all the checks whose failure means "we consider lldb
487  // not to have hit the breakpoint". Now we're going to check for
488  // conditions that might continue after hitting. Start with the
489  // ignore count:
490  if (!bp_loc_sp->IgnoreCountShouldStop()) {
491  actually_said_continue = true;
492  continue;
493  }
494 
495  // Check the auto-continue bit on the location, do this before the
496  // callback since it may change this, but that would be for the
497  // NEXT hit. Note, you might think you could check auto-continue
498  // before the condition, and not evaluate the condition if it says
499  // to continue. But failing the condition means the breakpoint was
500  // effectively NOT HIT. So these two states are different.
501  bool auto_continue_says_stop = true;
502  if (bp_loc_sp->IsAutoContinue())
503  {
504  LLDB_LOGF(log,
505  "Continuing breakpoint %s as AutoContinue was set.",
506  loc_desc.GetData());
507  // We want this stop reported, so you will know we auto-continued
508  // but only for external breakpoints:
509  if (!internal_breakpoint)
510  thread_sp->SetShouldReportStop(eVoteYes);
511  auto_continue_says_stop = false;
512  }
513 
514  bool callback_says_stop = true;
515 
516  // FIXME: For now the callbacks have to run in async mode - the
517  // first time we restart we need
518  // to get out of there. So set it here.
519  // When we figure out how to nest breakpoint hits then this will
520  // change.
521 
522  // Don't run async callbacks in PerformAction. They have already
523  // been taken into account with async_should_stop.
524  if (!bp_loc_sp->IsCallbackSynchronous()) {
525  Debugger &debugger = thread_sp->CalculateTarget()->GetDebugger();
526  bool old_async = debugger.GetAsyncExecution();
527  debugger.SetAsyncExecution(true);
528 
529  callback_says_stop = bp_loc_sp->InvokeCallback(&context);
530 
531  debugger.SetAsyncExecution(old_async);
532 
533  if (callback_says_stop && auto_continue_says_stop)
534  m_should_stop = true;
535  else
536  actually_said_continue = true;
537  }
538 
539  // If we are going to stop for this breakpoint, then remove the
540  // breakpoint.
541  if (callback_says_stop && bp_loc_sp &&
542  bp_loc_sp->GetBreakpoint().IsOneShot()) {
543  thread_sp->GetProcess()->GetTarget().RemoveBreakpointByID(
544  bp_loc_sp->GetBreakpoint().GetID());
545  }
546  // Also make sure that the callback hasn't continued the target. If
547  // it did, when we'll set m_should_start to false and get out of
548  // here.
549  if (HasTargetRunSinceMe()) {
550  m_should_stop = false;
551  actually_said_continue = true;
552  break;
553  }
554  }
555  // At this point if nobody actually told us to continue, we should
556  // give the async breakpoint callback a chance to weigh in:
557  if (!actually_said_continue && !m_should_stop) {
558  m_should_stop = async_should_stop;
559  }
560  }
561  // We've figured out what this stop wants to do, so mark it as valid so
562  // we don't compute it again.
563  m_should_stop_is_valid = true;
564  } else {
565  m_should_stop = true;
566  m_should_stop_is_valid = true;
567  Log *log_process(
569 
570  LLDB_LOGF(log_process,
571  "Process::%s could not find breakpoint site id: %" PRId64
572  "...",
573  __FUNCTION__, m_value);
574  }
575 
576  if ((!m_should_stop || internal_breakpoint) &&
577  thread_sp->CompletedPlanOverridesBreakpoint()) {
578 
579  // Override should_stop decision when we have completed step plan
580  // additionally to the breakpoint
581  m_should_stop = true;
582 
583  // We know we're stopping for a completed plan and we don't want to
584  // show the breakpoint stop, so compute the public stop info immediately
585  // here.
586  thread_sp->CalculatePublicStopInfo();
587  }
588 
589  LLDB_LOGF(log,
590  "Process::%s returning from action with m_should_stop: %d.",
591  __FUNCTION__, m_should_stop);
592  }
593  }
594 
595 private:
598  bool m_should_perform_action; // Since we are trying to preserve the "state"
599  // of the system even if we run functions
600  // etc. behind the users backs, we need to make sure we only REALLY perform
601  // the action once.
602  lldb::addr_t m_address; // We use this to capture the breakpoint site address
603  // when we create the StopInfo,
604  // in case somebody deletes it between the time the StopInfo is made and the
605  // description is asked for.
608 };
609 
610 // StopInfoWatchpoint
611 
612 class StopInfoWatchpoint : public StopInfo {
613 public:
614  // Make sure watchpoint is properly disabled and subsequently enabled while
615  // performing watchpoint actions.
617  public:
618  WatchpointSentry(ProcessSP p_sp, WatchpointSP w_sp) : process_sp(p_sp),
619  watchpoint_sp(w_sp) {
620  if (process_sp && watchpoint_sp) {
621  const bool notify = false;
622  watchpoint_sp->TurnOnEphemeralMode();
623  process_sp->DisableWatchpoint(watchpoint_sp.get(), notify);
624  process_sp->AddPreResumeAction(SentryPreResumeAction, this);
625  }
626  }
627 
628  void DoReenable() {
629  if (process_sp && watchpoint_sp) {
630  bool was_disabled = watchpoint_sp->IsDisabledDuringEphemeralMode();
631  watchpoint_sp->TurnOffEphemeralMode();
632  const bool notify = false;
633  if (was_disabled) {
634  process_sp->DisableWatchpoint(watchpoint_sp.get(), notify);
635  } else {
636  process_sp->EnableWatchpoint(watchpoint_sp.get(), notify);
637  }
638  }
639  }
640 
642  DoReenable();
643  if (process_sp)
644  process_sp->ClearPreResumeAction(SentryPreResumeAction, this);
645  }
646 
647  static bool SentryPreResumeAction(void *sentry_void) {
648  WatchpointSentry *sentry = (WatchpointSentry *) sentry_void;
649  sentry->DoReenable();
650  return true;
651  }
652 
653  private:
654  ProcessSP process_sp;
655  WatchpointSP watchpoint_sp;
656  };
657 
659  lldb::addr_t watch_hit_addr)
660  : StopInfo(thread, watch_id), m_should_stop(false),
661  m_should_stop_is_valid(false), m_watch_hit_addr(watch_hit_addr) {}
662 
663  ~StopInfoWatchpoint() override = default;
664 
665  StopReason GetStopReason() const override { return eStopReasonWatchpoint; }
666 
667  const char *GetDescription() override {
668  if (m_description.empty()) {
669  StreamString strm;
670  strm.Printf("watchpoint %" PRIi64, m_value);
672  }
673  return m_description.c_str();
674  }
675 
676 protected:
677  bool ShouldStopSynchronous(Event *event_ptr) override {
678  // ShouldStop() method is idempotent and should not affect hit count. See
679  // Process::RunPrivateStateThread()->Process()->HandlePrivateEvent()
680  // -->Process()::ShouldBroadcastEvent()->ThreadList::ShouldStop()->
681  // Thread::ShouldStop()->ThreadPlanBase::ShouldStop()->
682  // StopInfoWatchpoint::ShouldStop() and
683  // Event::DoOnRemoval()->Process::ProcessEventData::DoOnRemoval()->
684  // StopInfoWatchpoint::PerformAction().
686  return m_should_stop;
687 
688  ThreadSP thread_sp(m_thread_wp.lock());
689  if (thread_sp) {
690  WatchpointSP wp_sp(
691  thread_sp->CalculateTarget()->GetWatchpointList().FindByID(
692  GetValue()));
693  if (wp_sp) {
694  // Check if we should stop at a watchpoint.
695  ExecutionContext exe_ctx(thread_sp->GetStackFrameAtIndex(0));
696  StoppointCallbackContext context(event_ptr, exe_ctx, true);
697  m_should_stop = wp_sp->ShouldStop(&context);
698  } else {
700 
701  LLDB_LOGF(log,
702  "Process::%s could not find watchpoint location id: %" PRId64
703  "...",
704  __FUNCTION__, GetValue());
705 
706  m_should_stop = true;
707  }
708  }
709  m_should_stop_is_valid = true;
710  return m_should_stop;
711  }
712 
713  bool ShouldStop(Event *event_ptr) override {
714  // This just reports the work done by PerformAction or the synchronous
715  // stop. It should only ever get called after they have had a chance to
716  // run.
717  assert(m_should_stop_is_valid);
718  return m_should_stop;
719  }
720 
721  void PerformAction(Event *event_ptr) override {
723  // We're going to calculate if we should stop or not in some way during the
724  // course of this code. Also by default we're going to stop, so set that
725  // here.
726  m_should_stop = true;
727 
728 
729  ThreadSP thread_sp(m_thread_wp.lock());
730  if (thread_sp) {
731 
732  WatchpointSP wp_sp(
733  thread_sp->CalculateTarget()->GetWatchpointList().FindByID(
734  GetValue()));
735  if (wp_sp) {
736  ExecutionContext exe_ctx(thread_sp->GetStackFrameAtIndex(0));
737  ProcessSP process_sp = exe_ctx.GetProcessSP();
738 
739  {
740  // check if this process is running on an architecture where
741  // watchpoints trigger before the associated instruction runs. if so,
742  // disable the WP, single-step and then re-enable the watchpoint
743  if (process_sp) {
744  uint32_t num;
745  bool wp_triggers_after;
746 
747  if (process_sp->GetWatchpointSupportInfo(num, wp_triggers_after)
748  .Success()) {
749  if (!wp_triggers_after) {
750  // We need to preserve the watch_index before watchpoint is
751  // disable. Since Watchpoint::SetEnabled will clear the watch
752  // index. This will fix TestWatchpointIter failure
753  Watchpoint *wp = wp_sp.get();
754  uint32_t watch_index = wp->GetHardwareIndex();
755  process_sp->DisableWatchpoint(wp, false);
756  StopInfoSP stored_stop_info_sp = thread_sp->GetStopInfo();
757  assert(stored_stop_info_sp.get() == this);
758 
759  Status new_plan_status;
760  ThreadPlanSP new_plan_sp(
761  thread_sp->QueueThreadPlanForStepSingleInstruction(
762  false, // step-over
763  false, // abort_other_plans
764  true, // stop_other_threads
765  new_plan_status));
766  if (new_plan_sp && new_plan_status.Success()) {
767  new_plan_sp->SetIsMasterPlan(true);
768  new_plan_sp->SetOkayToDiscard(false);
769  new_plan_sp->SetPrivate(true);
770  }
771  process_sp->GetThreadList().SetSelectedThreadByID(
772  thread_sp->GetID());
773  process_sp->ResumeSynchronous(nullptr);
774  process_sp->GetThreadList().SetSelectedThreadByID(
775  thread_sp->GetID());
776  thread_sp->SetStopInfo(stored_stop_info_sp);
777  process_sp->EnableWatchpoint(wp, false);
778  wp->SetHardwareIndex(watch_index);
779  }
780  }
781  }
782  }
783 
784  // This sentry object makes sure the current watchpoint is disabled
785  // while performing watchpoint actions, and it is then enabled after we
786  // are finished.
787  WatchpointSentry sentry(process_sp, wp_sp);
788 
789  /*
790  * MIPS: Last 3bits of the watchpoint address are masked by the kernel.
791  * For example:
792  * 'n' is at 0x120010d00 and 'm' is 0x120010d04. When a watchpoint is
793  * set at 'm', then
794  * watch exception is generated even when 'n' is read/written. To handle
795  * this case,
796  * server emulates the instruction at PC and finds the base address of
797  * the load/store
798  * instruction and appends it in the description of the stop-info
799  * packet. If watchpoint
800  * is not set on this address by user then this do not stop.
801  */
803  WatchpointSP wp_hit_sp =
804  thread_sp->CalculateTarget()->GetWatchpointList().FindByAddress(
806  if (!wp_hit_sp) {
807  m_should_stop = false;
808  wp_sp->IncrementFalseAlarmsAndReviseHitCount();
809  }
810  }
811 
812  // TODO: This condition should be checked in the synchronous part of the
813  // watchpoint code
814  // (Watchpoint::ShouldStop), so that we avoid pulling an event even if
815  // the watchpoint fails the ignore count condition. It is moved here
816  // temporarily, because for archs with
817  // watchpoint_exceptions_received=before, the code in the previous
818  // lines takes care of moving the inferior to next PC. We have to check
819  // the ignore count condition after this is done, otherwise we will hit
820  // same watchpoint multiple times until we pass ignore condition, but
821  // we won't actually be ignoring them.
822  if (wp_sp->GetHitCount() <= wp_sp->GetIgnoreCount())
823  m_should_stop = false;
824 
825  Debugger &debugger = exe_ctx.GetTargetRef().GetDebugger();
826 
827  if (m_should_stop && wp_sp->GetConditionText() != nullptr) {
828  // We need to make sure the user sees any parse errors in their
829  // condition, so we'll hook the constructor errors up to the
830  // debugger's Async I/O.
831  ExpressionResults result_code;
832  EvaluateExpressionOptions expr_options;
833  expr_options.SetUnwindOnError(true);
834  expr_options.SetIgnoreBreakpoints(true);
835  ValueObjectSP result_value_sp;
836  Status error;
837  result_code = UserExpression::Evaluate(
838  exe_ctx, expr_options, wp_sp->GetConditionText(),
839  llvm::StringRef(), result_value_sp, error);
840 
841  if (result_code == eExpressionCompleted) {
842  if (result_value_sp) {
843  Scalar scalar_value;
844  if (result_value_sp->ResolveValue(scalar_value)) {
845  if (scalar_value.ULongLong(1) == 0) {
846  // We have been vetoed. This takes precedence over querying
847  // the watchpoint whether it should stop (aka ignore count
848  // and friends). See also StopInfoWatchpoint::ShouldStop()
849  // as well as Process::ProcessEventData::DoOnRemoval().
850  m_should_stop = false;
851  } else
852  m_should_stop = true;
853  LLDB_LOGF(log,
854  "Condition successfully evaluated, result is %s.\n",
855  m_should_stop ? "true" : "false");
856  } else {
857  m_should_stop = true;
858  LLDB_LOGF(
859  log,
860  "Failed to get an integer result from the expression.");
861  }
862  }
863  } else {
864  StreamSP error_sp = debugger.GetAsyncErrorStream();
865  error_sp->Printf(
866  "Stopped due to an error evaluating condition of watchpoint ");
867  wp_sp->GetDescription(error_sp.get(), eDescriptionLevelBrief);
868  error_sp->Printf(": \"%s\"", wp_sp->GetConditionText());
869  error_sp->EOL();
870  const char *err_str = error.AsCString("<Unknown Error>");
871  LLDB_LOGF(log, "Error evaluating condition: \"%s\"\n", err_str);
872 
873  error_sp->PutCString(err_str);
874  error_sp->EOL();
875  error_sp->Flush();
876  // If the condition fails to be parsed or run, we should stop.
877  m_should_stop = true;
878  }
879  }
880 
881  // If the condition says to stop, we run the callback to further decide
882  // whether to stop.
883  if (m_should_stop) {
884  // FIXME: For now the callbacks have to run in async mode - the
885  // first time we restart we need
886  // to get out of there. So set it here.
887  // When we figure out how to nest watchpoint hits then this will
888  // change.
889 
890  bool old_async = debugger.GetAsyncExecution();
891  debugger.SetAsyncExecution(true);
892 
893  StoppointCallbackContext context(event_ptr, exe_ctx, false);
894  bool stop_requested = wp_sp->InvokeCallback(&context);
895 
896  debugger.SetAsyncExecution(old_async);
897 
898  // Also make sure that the callback hasn't continued the target. If
899  // it did, when we'll set m_should_stop to false and get out of here.
900  if (HasTargetRunSinceMe())
901  m_should_stop = false;
902 
903  if (m_should_stop && !stop_requested) {
904  // We have been vetoed by the callback mechanism.
905  m_should_stop = false;
906  }
907  }
908  // Finally, if we are going to stop, print out the new & old values:
909  if (m_should_stop) {
910  wp_sp->CaptureWatchedValue(exe_ctx);
911 
912  Debugger &debugger = exe_ctx.GetTargetRef().GetDebugger();
913  StreamSP output_sp = debugger.GetAsyncOutputStream();
914  wp_sp->DumpSnapshots(output_sp.get());
915  output_sp->EOL();
916  output_sp->Flush();
917  }
918 
919  } else {
920  Log *log_process(
922 
923  LLDB_LOGF(log_process,
924  "Process::%s could not find watchpoint id: %" PRId64 "...",
925  __FUNCTION__, m_value);
926  }
927  LLDB_LOGF(log,
928  "Process::%s returning from action with m_should_stop: %d.",
929  __FUNCTION__, m_should_stop);
930 
931  m_should_stop_is_valid = true;
932  }
933  }
934 
935 private:
939 };
940 
941 // StopInfoUnixSignal
942 
943 class StopInfoUnixSignal : public StopInfo {
944 public:
945  StopInfoUnixSignal(Thread &thread, int signo, const char *description)
946  : StopInfo(thread, signo) {
947  SetDescription(description);
948  }
949 
950  ~StopInfoUnixSignal() override = default;
951 
952  StopReason GetStopReason() const override { return eStopReasonSignal; }
953 
954  bool ShouldStopSynchronous(Event *event_ptr) override {
955  ThreadSP thread_sp(m_thread_wp.lock());
956  if (thread_sp)
957  return thread_sp->GetProcess()->GetUnixSignals()->GetShouldStop(m_value);
958  return false;
959  }
960 
961  bool ShouldStop(Event *event_ptr) override {
962  ThreadSP thread_sp(m_thread_wp.lock());
963  if (thread_sp)
964  return thread_sp->GetProcess()->GetUnixSignals()->GetShouldStop(m_value);
965  return false;
966  }
967 
968  // If should stop returns false, check if we should notify of this event
969  bool DoShouldNotify(Event *event_ptr) override {
970  ThreadSP thread_sp(m_thread_wp.lock());
971  if (thread_sp) {
972  bool should_notify =
973  thread_sp->GetProcess()->GetUnixSignals()->GetShouldNotify(m_value);
974  if (should_notify) {
975  StreamString strm;
976  strm.Printf(
977  "thread %d received signal: %s", thread_sp->GetIndexID(),
978  thread_sp->GetProcess()->GetUnixSignals()->GetSignalAsCString(
979  m_value));
981  strm.GetData());
982  }
983  return should_notify;
984  }
985  return true;
986  }
987 
988  void WillResume(lldb::StateType resume_state) override {
989  ThreadSP thread_sp(m_thread_wp.lock());
990  if (thread_sp) {
991  if (!thread_sp->GetProcess()->GetUnixSignals()->GetShouldSuppress(
992  m_value))
993  thread_sp->SetResumeSignal(m_value);
994  }
995  }
996 
997  const char *GetDescription() override {
998  if (m_description.empty()) {
999  ThreadSP thread_sp(m_thread_wp.lock());
1000  if (thread_sp) {
1001  StreamString strm;
1002  const char *signal_name =
1003  thread_sp->GetProcess()->GetUnixSignals()->GetSignalAsCString(
1004  m_value);
1005  if (signal_name)
1006  strm.Printf("signal %s", signal_name);
1007  else
1008  strm.Printf("signal %" PRIi64, m_value);
1010  }
1011  }
1012  return m_description.c_str();
1013  }
1014 };
1015 
1016 // StopInfoTrace
1017 
1018 class StopInfoTrace : public StopInfo {
1019 public:
1021 
1022  ~StopInfoTrace() override = default;
1023 
1024  StopReason GetStopReason() const override { return eStopReasonTrace; }
1025 
1026  const char *GetDescription() override {
1027  if (m_description.empty())
1028  return "trace";
1029  else
1030  return m_description.c_str();
1031  }
1032 };
1033 
1034 // StopInfoException
1035 
1036 class StopInfoException : public StopInfo {
1037 public:
1038  StopInfoException(Thread &thread, const char *description)
1039  : StopInfo(thread, LLDB_INVALID_UID) {
1040  if (description)
1041  SetDescription(description);
1042  }
1043 
1044  ~StopInfoException() override = default;
1045 
1046  StopReason GetStopReason() const override { return eStopReasonException; }
1047 
1048  const char *GetDescription() override {
1049  if (m_description.empty())
1050  return "exception";
1051  else
1052  return m_description.c_str();
1053  }
1054 };
1055 
1056 // StopInfoProcessorTrace
1057 
1059 public:
1060  StopInfoProcessorTrace(Thread &thread, const char *description)
1061  : StopInfo(thread, LLDB_INVALID_UID) {
1062  if (description)
1063  SetDescription(description);
1064  }
1065 
1066  ~StopInfoProcessorTrace() override = default;
1067 
1068  StopReason GetStopReason() const override {
1070  }
1071 
1072  const char *GetDescription() override {
1073  if (m_description.empty())
1074  return "processor trace event";
1075  else
1076  return m_description.c_str();
1077  }
1078 };
1079 
1080 // StopInfoThreadPlan
1081 
1083 public:
1084  StopInfoThreadPlan(ThreadPlanSP &plan_sp, ValueObjectSP &return_valobj_sp,
1085  ExpressionVariableSP &expression_variable_sp)
1086  : StopInfo(plan_sp->GetThread(), LLDB_INVALID_UID), m_plan_sp(plan_sp),
1087  m_return_valobj_sp(return_valobj_sp),
1088  m_expression_variable_sp(expression_variable_sp) {}
1089 
1090  ~StopInfoThreadPlan() override = default;
1091 
1092  StopReason GetStopReason() const override { return eStopReasonPlanComplete; }
1093 
1094  const char *GetDescription() override {
1095  if (m_description.empty()) {
1096  StreamString strm;
1097  m_plan_sp->GetDescription(&strm, eDescriptionLevelBrief);
1099  }
1100  return m_description.c_str();
1101  }
1102 
1103  ValueObjectSP GetReturnValueObject() { return m_return_valobj_sp; }
1104 
1105  ExpressionVariableSP GetExpressionVariable() {
1106  return m_expression_variable_sp;
1107  }
1108 
1109 protected:
1110  bool ShouldStop(Event *event_ptr) override {
1111  if (m_plan_sp)
1112  return m_plan_sp->ShouldStop(event_ptr);
1113  else
1114  return StopInfo::ShouldStop(event_ptr);
1115  }
1116 
1117 private:
1118  ThreadPlanSP m_plan_sp;
1119  ValueObjectSP m_return_valobj_sp;
1120  ExpressionVariableSP m_expression_variable_sp;
1121 };
1122 
1123 // StopInfoExec
1124 
1125 class StopInfoExec : public StopInfo {
1126 public:
1128  : StopInfo(thread, LLDB_INVALID_UID), m_performed_action(false) {}
1129 
1130  ~StopInfoExec() override = default;
1131 
1132  bool ShouldStop(Event *event_ptr) override {
1133  ThreadSP thread_sp(m_thread_wp.lock());
1134  if (thread_sp)
1135  return thread_sp->GetProcess()->GetStopOnExec();
1136  return false;
1137  }
1138 
1139  StopReason GetStopReason() const override { return eStopReasonExec; }
1140 
1141  const char *GetDescription() override { return "exec"; }
1142 
1143 protected:
1144  void PerformAction(Event *event_ptr) override {
1145  // Only perform the action once
1146  if (m_performed_action)
1147  return;
1148  m_performed_action = true;
1149  ThreadSP thread_sp(m_thread_wp.lock());
1150  if (thread_sp)
1151  thread_sp->GetProcess()->DidExec();
1152  }
1153 
1155 };
1156 
1157 // StopInfoFork
1158 
1159 class StopInfoFork : public StopInfo {
1160 public:
1161  StopInfoFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
1162  : StopInfo(thread, child_pid), m_performed_action(false),
1163  m_child_pid(child_pid), m_child_tid(child_tid) {}
1164 
1165  ~StopInfoFork() override = default;
1166 
1167  bool ShouldStop(Event *event_ptr) override { return false; }
1168 
1169  StopReason GetStopReason() const override { return eStopReasonFork; }
1170 
1171  const char *GetDescription() override { return "fork"; }
1172 
1173 protected:
1174  void PerformAction(Event *event_ptr) override {
1175  // Only perform the action once
1176  if (m_performed_action)
1177  return;
1178  m_performed_action = true;
1179  ThreadSP thread_sp(m_thread_wp.lock());
1180  if (thread_sp)
1181  thread_sp->GetProcess()->DidFork(m_child_pid, m_child_tid);
1182  }
1183 
1185 
1186 private:
1189 };
1190 
1191 // StopInfoVFork
1192 
1193 class StopInfoVFork : public StopInfo {
1194 public:
1195  StopInfoVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
1196  : StopInfo(thread, child_pid), m_performed_action(false),
1197  m_child_pid(child_pid), m_child_tid(child_tid) {}
1198 
1199  ~StopInfoVFork() override = default;
1200 
1201  bool ShouldStop(Event *event_ptr) override { return false; }
1202 
1203  StopReason GetStopReason() const override { return eStopReasonVFork; }
1204 
1205  const char *GetDescription() override { return "vfork"; }
1206 
1207 protected:
1208  void PerformAction(Event *event_ptr) override {
1209  // Only perform the action once
1210  if (m_performed_action)
1211  return;
1212  m_performed_action = true;
1213  ThreadSP thread_sp(m_thread_wp.lock());
1214  if (thread_sp)
1215  thread_sp->GetProcess()->DidVFork(m_child_pid, m_child_tid);
1216  }
1217 
1219 
1220 private:
1223 };
1224 
1225 // StopInfoVForkDone
1226 
1227 class StopInfoVForkDone : public StopInfo {
1228 public:
1230  : StopInfo(thread, 0), m_performed_action(false) {}
1231 
1232  ~StopInfoVForkDone() override = default;
1233 
1234  bool ShouldStop(Event *event_ptr) override { return false; }
1235 
1236  StopReason GetStopReason() const override { return eStopReasonVForkDone; }
1237 
1238  const char *GetDescription() override { return "vforkdone"; }
1239 
1240 protected:
1241  void PerformAction(Event *event_ptr) override {
1242  // Only perform the action once
1243  if (m_performed_action)
1244  return;
1245  m_performed_action = true;
1246  ThreadSP thread_sp(m_thread_wp.lock());
1247  if (thread_sp)
1248  thread_sp->GetProcess()->DidVForkDone();
1249  }
1250 
1252 };
1253 
1254 } // namespace lldb_private
1255 
1257  break_id_t break_id) {
1258  return StopInfoSP(new StopInfoBreakpoint(thread, break_id));
1259 }
1260 
1262  break_id_t break_id,
1263  bool should_stop) {
1264  return StopInfoSP(new StopInfoBreakpoint(thread, break_id, should_stop));
1265 }
1266 
1267 StopInfoSP
1269  lldb::addr_t watch_hit_addr) {
1270  return StopInfoSP(new StopInfoWatchpoint(thread, watch_id, watch_hit_addr));
1271 }
1272 
1273 StopInfoSP StopInfo::CreateStopReasonWithSignal(Thread &thread, int signo,
1274  const char *description) {
1275  return StopInfoSP(new StopInfoUnixSignal(thread, signo, description));
1276 }
1277 
1279  return StopInfoSP(new StopInfoTrace(thread));
1280 }
1281 
1283  ThreadPlanSP &plan_sp, ValueObjectSP return_valobj_sp,
1284  ExpressionVariableSP expression_variable_sp) {
1285  return StopInfoSP(new StopInfoThreadPlan(plan_sp, return_valobj_sp,
1286  expression_variable_sp));
1287 }
1288 
1290  const char *description) {
1291  return StopInfoSP(new StopInfoException(thread, description));
1292 }
1293 
1295  const char *description) {
1296  return StopInfoSP(new StopInfoProcessorTrace(thread, description));
1297 }
1298 
1300  return StopInfoSP(new StopInfoExec(thread));
1301 }
1302 
1304  lldb::pid_t child_pid,
1305  lldb::tid_t child_tid) {
1306  return StopInfoSP(new StopInfoFork(thread, child_pid, child_tid));
1307 }
1308 
1309 
1311  lldb::pid_t child_pid,
1312  lldb::tid_t child_tid) {
1313  return StopInfoSP(new StopInfoVFork(thread, child_pid, child_tid));
1314 }
1315 
1317  return StopInfoSP(new StopInfoVForkDone(thread));
1318 }
1319 
1320 ValueObjectSP StopInfo::GetReturnValueObject(StopInfoSP &stop_info_sp) {
1321  if (stop_info_sp &&
1322  stop_info_sp->GetStopReason() == eStopReasonPlanComplete) {
1323  StopInfoThreadPlan *plan_stop_info =
1324  static_cast<StopInfoThreadPlan *>(stop_info_sp.get());
1325  return plan_stop_info->GetReturnValueObject();
1326  } else
1327  return ValueObjectSP();
1328 }
1329 
1330 ExpressionVariableSP StopInfo::GetExpressionVariable(StopInfoSP &stop_info_sp) {
1331  if (stop_info_sp &&
1332  stop_info_sp->GetStopReason() == eStopReasonPlanComplete) {
1333  StopInfoThreadPlan *plan_stop_info =
1334  static_cast<StopInfoThreadPlan *>(stop_info_sp.get());
1335  return plan_stop_info->GetExpressionVariable();
1336  } else
1337  return ExpressionVariableSP();
1338 }
1339 
1340 lldb::ValueObjectSP
1341 StopInfo::GetCrashingDereference(StopInfoSP &stop_info_sp,
1342  lldb::addr_t *crashing_address) {
1343  if (!stop_info_sp) {
1344  return ValueObjectSP();
1345  }
1346 
1347  const char *description = stop_info_sp->GetDescription();
1348  if (!description) {
1349  return ValueObjectSP();
1350  }
1351 
1352  ThreadSP thread_sp = stop_info_sp->GetThread();
1353  if (!thread_sp) {
1354  return ValueObjectSP();
1355  }
1356 
1357  StackFrameSP frame_sp = thread_sp->GetSelectedFrame();
1358 
1359  if (!frame_sp) {
1360  return ValueObjectSP();
1361  }
1362 
1363  const char address_string[] = "address=";
1364 
1365  const char *address_loc = strstr(description, address_string);
1366  if (!address_loc) {
1367  return ValueObjectSP();
1368  }
1369 
1370  address_loc += (sizeof(address_string) - 1);
1371 
1372  uint64_t address = strtoull(address_loc, nullptr, 0);
1373  if (crashing_address) {
1374  *crashing_address = address;
1375  }
1376 
1377  return frame_sp->GuessValueForAddress(address);
1378 }
lldb_private::StopInfoVForkDone::PerformAction
void PerformAction(Event *event_ptr) override
Definition: StopInfo.cpp:1241
lldb_private::BreakpointLocationCollection::GetByIndex
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
Definition: BreakpointLocationCollection.cpp:101
lldb_private::StopInfoExec::~StopInfoExec
~StopInfoExec() override=default
lldb_private::StopInfoThreadPlan::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1092
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::StopInfoTrace::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1026
lldb_private::StopInfoBreakpoint::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:184
lldb_private::StopInfoVFork::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:1201
lldb_private::StoppointCallbackContext
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
Definition: StoppointCallbackContext.h:26
lldb_private::StopInfoVForkDone::~StopInfoVForkDone
~StopInfoVForkDone() override=default
lldb_private::StopInfoThreadPlan::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:1110
lldb_private::Event
Definition: Event.h:180
lldb_private::StopInfoThreadPlan::GetExpressionVariable
ExpressionVariableSP GetExpressionVariable()
Definition: StopInfo.cpp:1105
lldb_private::StopInfoThreadPlan::m_plan_sp
ThreadPlanSP m_plan_sp
Definition: StopInfo.cpp:1118
lldb_private::StopInfo::m_stop_id
uint32_t m_stop_id
Definition: StopInfo.h:175
lldb_private::StopInfoVFork::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1205
lldb_private::StopInfoProcessorTrace
Definition: StopInfo.cpp:1058
lldb_private::StopInfoTrace::StopInfoTrace
StopInfoTrace(Thread &thread)
Definition: StopInfo.cpp:1020
lldb::eStopReasonVFork
@ eStopReasonVFork
Definition: lldb-enumerations.h:253
lldb_private::ExecutionContext::GetProcessPtr
Process * GetProcessPtr() const
Returns a pointer to the process object.
Definition: ExecutionContext.cpp:208
lldb_private::eVoteYes
@ eVoteYes
Definition: lldb-private-enumerations.h:59
lldb_private::StopInfoThreadPlan::GetReturnValueObject
ValueObjectSP GetReturnValueObject()
Definition: StopInfo.cpp:1103
lldb_private::StopInfoException::StopInfoException
StopInfoException(Thread &thread, const char *description)
Definition: StopInfo.cpp:1038
lldb::ExpressionResults
ExpressionResults
The results of expression evaluation.
Definition: lldb-enumerations.h:270
lldb_private::StopInfoBreakpoint::StoreBPInfo
void StoreBPInfo()
Definition: StopInfo.cpp:104
lldb_private::StopInfoBreakpoint
Definition: StopInfo.cpp:84
lldb_private::StopInfoExec::m_performed_action
bool m_performed_action
Definition: StopInfo.cpp:1154
lldb_private::Process::GetModIDRef
const ProcessModID & GetModIDRef() const
Definition: Process.h:1365
lldb_private::StopInfoUnixSignal::ShouldStopSynchronous
bool ShouldStopSynchronous(Event *event_ptr) override
Definition: StopInfo.cpp:954
lldb_private::StopInfoTrace
Definition: StopInfo.cpp:1018
LLDB_INVALID_UID
#define LLDB_INVALID_UID
Definition: lldb-defines.h:92
lldb_private::Scalar
Definition: Scalar.h:34
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::StopInfoUnixSignal::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:952
lldb_private::StopInfoFork::StopInfoFork
StopInfoFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
Definition: StopInfo.cpp:1161
lldb_private::Process
Definition: Process.h:340
lldb_private::StopInfoFork::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:1167
lldb_private::StopInfoExec
Definition: StopInfo.cpp:1125
BreakpointLocation.h
lldb_private::Process::GetTarget
Target & GetTarget()
Get the target object pointer for this module.
Definition: Process.h:1208
lldb_private::StopInfo::CreateStopReasonWithSignal
static lldb::StopInfoSP CreateStopReasonWithSignal(Thread &thread, int signo, const char *description=nullptr)
Definition: StopInfo.cpp:1273
lldb_private::EvaluateExpressionOptions
Definition: Target.h:258
lldb_private::StopInfoVFork::~StopInfoVFork
~StopInfoVFork() override=default
StoppointCallbackContext.h
LIBLLDB_LOG_WATCHPOINTS
#define LIBLLDB_LOG_WATCHPOINTS
Definition: Logging.h:20
lldb::StopReason
StopReason
Thread stop reasons.
Definition: lldb-enumerations.h:239
lldb_private::StopInfo::ShouldStop
virtual bool ShouldStop(Event *event_ptr)
Definition: StopInfo.h:171
lldb_private::StopInfoWatchpoint::m_should_stop_is_valid
bool m_should_stop_is_valid
Definition: StopInfo.cpp:937
lldb::eStopReasonException
@ eStopReasonException
Definition: lldb-enumerations.h:246
UserExpression.h
lldb_private::StopInfoFork::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1171
lldb_private::StopInfoWatchpoint::WatchpointSentry::DoReenable
void DoReenable()
Definition: StopInfo.cpp:628
lldb_private::StopInfo::CreateStopReasonToTrace
static lldb::StopInfoSP CreateStopReasonToTrace(Thread &thread)
Definition: StopInfo.cpp:1278
lldb_private::StopInfoWatchpoint::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:665
lldb_private::UserExpression::Evaluate
static lldb::ExpressionResults Evaluate(ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options, llvm::StringRef expr_cstr, llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp, Status &error, std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
Evaluate one expression in the scratch context of the target passed in the exe_ctx and return its res...
Definition: UserExpression.cpp:139
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb::eStopReasonTrace
@ eStopReasonTrace
Definition: lldb-enumerations.h:242
lldb_private::Target::GetDebugger
Debugger & GetDebugger()
Definition: Target.h:999
lldb_private::StoppointSite::SetHardwareIndex
void SetHardwareIndex(uint32_t index)
Definition: StoppointSite.h:43
Debugger.h
lldb_private::StopInfoVFork::PerformAction
void PerformAction(Event *event_ptr) override
Definition: StopInfo.cpp:1208
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb_private::StopInfoWatchpoint::ShouldStopSynchronous
bool ShouldStopSynchronous(Event *event_ptr) override
Definition: StopInfo.cpp:677
lldb_private::StopInfo::GetValue
uint64_t GetValue() const
Definition: StopInfo.h:45
lldb_private::StopInfoWatchpoint::StopInfoWatchpoint
StopInfoWatchpoint(Thread &thread, break_id_t watch_id, lldb::addr_t watch_hit_addr)
Definition: StopInfo.cpp:658
Process.h
lldb_private::StopInfoFork::m_performed_action
bool m_performed_action
Definition: StopInfo.cpp:1184
lldb_private::StopInfo::m_resume_id
uint32_t m_resume_id
Definition: StopInfo.h:176
lldb::eStateStopped
@ eStateStopped
Process or thread is stopped and can be examined.
Definition: lldb-enumerations.h:84
Target.h
lldb_private::StopInfo::m_value
uint64_t m_value
Definition: StopInfo.h:177
lldb_private::StopInfoVFork
Definition: StopInfo.cpp:1193
lldb_private::StopInfo::GetThread
lldb::ThreadSP GetThread() const
Definition: StopInfo.h:34
lldb_private::StopInfoWatchpoint::WatchpointSentry::watchpoint_sp
WatchpointSP watchpoint_sp
Definition: StopInfo.cpp:655
lldb_private::Thread::GetProcess
lldb::ProcessSP GetProcess() const
Definition: Thread.h:152
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::StopInfo::CreateStopReasonFork
static lldb::StopInfoSP CreateStopReasonFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
Definition: StopInfo.cpp:1303
lldb_private::Status::Success
bool Success() const
Test for success condition.
Definition: Status.cpp:288
lldb_private::StopInfoFork::m_child_pid
lldb::pid_t m_child_pid
Definition: StopInfo.cpp:1187
lldb_private::StopInfoWatchpoint::m_watch_hit_addr
lldb::addr_t m_watch_hit_addr
Definition: StopInfo.cpp:938
lldb::eStopReasonProcessorTrace
@ eStopReasonProcessorTrace
Definition: lldb-enumerations.h:251
lldb_private::StopInfoBreakpoint::DoShouldNotify
bool DoShouldNotify(Event *event_ptr) override
Definition: StopInfo.cpp:164
lldb_private::StopInfoExec::StopInfoExec
StopInfoExec(Thread &thread)
Definition: StopInfo.cpp:1127
Watchpoint.h
lldb_private::Scalar::ULongLong
unsigned long long ULongLong(unsigned long long fail_value=0) const
Definition: Scalar.cpp:334
Log.h
lldb_private::ProcessProperties::GetIgnoreBreakpointsInExpressions
bool GetIgnoreBreakpointsInExpressions() const
Definition: Process.cpp:233
lldb_private::StopInfoVFork::m_child_tid
lldb::tid_t m_child_tid
Definition: StopInfo.cpp:1222
lldb::eStopReasonWatchpoint
@ eStopReasonWatchpoint
Definition: lldb-enumerations.h:244
UnixSignals.h
lldb_private::Thread
Definition: Thread.h:60
lldb_private::StopInfoBreakpoint::PerformAction
void PerformAction(Event *event_ptr) override
Definition: StopInfo.cpp:258
lldb_private::StopInfoException
Definition: StopInfo.cpp:1036
lldb_private::StopInfoProcessorTrace::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1072
lldb_private::Watchpoint
Definition: Watchpoint.h:24
lldb_private::StopInfo::m_thread_wp
lldb::ThreadWP m_thread_wp
Definition: StopInfo.h:174
lldb_private::Debugger::GetAsyncOutputStream
lldb::StreamSP GetAsyncOutputStream()
Definition: Debugger.cpp:1061
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
lldb::eExpressionCompleted
@ eExpressionCompleted
Definition: lldb-enumerations.h:271
StreamString.h
lldb_private::StopInfoWatchpoint::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:667
lldb_private::Debugger::GetAsyncErrorStream
lldb::StreamSP GetAsyncErrorStream()
Definition: Debugger.cpp:1065
lldb_private::StopInfoFork
Definition: StopInfo.cpp:1159
lldb::break_id_t
int32_t break_id_t
Definition: lldb-types.h:88
lldb_private::StopInfoThreadPlan::m_expression_variable_sp
ExpressionVariableSP m_expression_variable_sp
Definition: StopInfo.cpp:1120
lldb_private::StopInfoBreakpoint::m_address
lldb::addr_t m_address
Definition: StopInfo.cpp:602
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::StopInfoWatchpoint::WatchpointSentry::WatchpointSentry
WatchpointSentry(ProcessSP p_sp, WatchpointSP w_sp)
Definition: StopInfo.cpp:618
lldb_private::StopInfo::CreateStopReasonWithWatchpointID
static lldb::StopInfoSP CreateStopReasonWithWatchpointID(Thread &thread, lldb::break_id_t watch_id, lldb::addr_t watch_hit_addr=LLDB_INVALID_ADDRESS)
Definition: StopInfo.cpp:1268
lldb_private::StopInfoExec::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1139
lldb_private::StopInfoUnixSignal
Definition: StopInfo.cpp:943
lldb_private::StopInfoVFork::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1203
lldb_private::StopInfoVForkDone
Definition: StopInfo.cpp:1227
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::StopInfoException::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1046
lldb_private::StopInfoExec::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1141
lldb_private::StopInfoProcessorTrace::StopInfoProcessorTrace
StopInfoProcessorTrace(Thread &thread, const char *description)
Definition: StopInfo.cpp:1060
lldb_private::StopInfoWatchpoint::WatchpointSentry::SentryPreResumeAction
static bool SentryPreResumeAction(void *sentry_void)
Definition: StopInfo.cpp:647
lldb_private::Debugger
Definition: Debugger.h:70
lldb_private::StopInfoUnixSignal::DoShouldNotify
bool DoShouldNotify(Event *event_ptr) override
Definition: StopInfo.cpp:969
lldb_private::StopInfoBreakpoint::m_break_id
lldb::break_id_t m_break_id
Definition: StopInfo.cpp:606
lldb_private::StopInfo::CreateStopReasonWithPlan
static lldb::StopInfoSP CreateStopReasonWithPlan(lldb::ThreadPlanSP &plan, lldb::ValueObjectSP return_valobj_sp, lldb::ExpressionVariableSP expression_variable_sp)
Definition: StopInfo.cpp:1282
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::StopInfoBreakpoint::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:250
lldb_private::StopInfoBreakpoint::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:133
lldb_private::StopInfo::HasTargetRunSinceMe
bool HasTargetRunSinceMe()
Definition: StopInfo.cpp:52
lldb_private::StopInfoException::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1048
lldb_private::EvaluateExpressionOptions::SetUnwindOnError
void SetUnwindOnError(bool unwind=false)
Definition: Target.h:305
Thread.h
lldb_private::StopInfoFork::~StopInfoFork
~StopInfoFork() override=default
lldb_private::StopInfoWatchpoint
Definition: StopInfo.cpp:612
lldb_private::StopInfoVFork::m_performed_action
bool m_performed_action
Definition: StopInfo.cpp:1218
lldb_private::BreakpointLocationCollection
Definition: BreakpointLocationCollection.h:20
lldb_private::StopInfoThreadPlan::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1094
ValueObject.h
lldb_private::StopInfoVFork::m_child_pid
lldb::pid_t m_child_pid
Definition: StopInfo.cpp:1221
LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_BREAK_ID
Definition: lldb-defines.h:49
lldb_private::ThreadList::ExpressionExecutionThreadPusher
Definition: ThreadList.h:47
lldb_private::StoppointSite::GetHardwareIndex
uint32_t GetHardwareIndex() const
Definition: StoppointSite.h:41
lldb_private::StopInfoWatchpoint::PerformAction
void PerformAction(Event *event_ptr) override
Definition: StopInfo.cpp:721
lldb_private::StopInfoExec::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:1132
ThreadPlan.h
lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints
void SetIgnoreBreakpoints(bool ignore=false)
Definition: Target.h:309
lldb_private::StopInfoVFork::StopInfoVFork
StopInfoVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
Definition: StopInfo.cpp:1195
lldb_private::StopInfoVForkDone::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:1234
lldb_private::Process::ProcessEventData::AddRestartedReason
static void AddRestartedReason(Event *event_ptr, const char *reason)
Definition: Process.cpp:4157
lldb_private::ExecutionContext::GetProcessSP
const lldb::ProcessSP & GetProcessSP() const
Get accessor to get the process shared pointer.
Definition: ExecutionContext.h:459
lldb::eStopReasonSignal
@ eStopReasonSignal
Definition: lldb-enumerations.h:245
lldb_private::StopInfoException::~StopInfoException
~StopInfoException() override=default
lldb_private::StopInfoBreakpoint::StopInfoBreakpoint
StopInfoBreakpoint(Thread &thread, break_id_t break_id)
Definition: StopInfo.cpp:86
lldb::eStopReasonExec
@ eStopReasonExec
Program was re-exec'ed.
Definition: lldb-enumerations.h:247
lldb_private::Status
Definition: Status.h:44
lldb_private::StopInfoVForkDone::StopInfoVForkDone
StopInfoVForkDone(Thread &thread)
Definition: StopInfo.cpp:1229
lldb_private::StopInfoUnixSignal::WillResume
void WillResume(lldb::StateType resume_state) override
Definition: StopInfo.cpp:988
lldb_private::StopInfo::CreateStopReasonWithExec
static lldb::StopInfoSP CreateStopReasonWithExec(Thread &thread)
Definition: StopInfo.cpp:1299
uint32_t
LIBLLDB_LOG_BREAKPOINTS
#define LIBLLDB_LOG_BREAKPOINTS
Definition: Logging.h:19
lldb_private::StopInfo::IsValid
bool IsValid() const
Definition: StopInfo.cpp:37
lldb_private::StopInfo::CreateStopReasonProcessorTrace
static lldb::StopInfoSP CreateStopReasonProcessorTrace(Thread &thread, const char *description)
Definition: StopInfo.cpp:1294
lldb_private::StopInfoThreadPlan::m_return_valobj_sp
ValueObjectSP m_return_valobj_sp
Definition: StopInfo.cpp:1119
lldb_private::StopInfoWatchpoint::WatchpointSentry::~WatchpointSentry
~WatchpointSentry()
Definition: StopInfo.cpp:641
lldb_private::StopInfoWatchpoint::~StopInfoWatchpoint
~StopInfoWatchpoint() override=default
lldb_private::StopInfo::CreateStopReasonVForkDone
static lldb::StopInfoSP CreateStopReasonVForkDone(Thread &thread)
Definition: StopInfo.cpp:1316
lldb_private::StopInfoExec::PerformAction
void PerformAction(Event *event_ptr) override
Definition: StopInfo.cpp:1144
lldb_private::StopInfoFork::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1169
lldb_private::StopInfo::GetExpressionVariable
static lldb::ExpressionVariableSP GetExpressionVariable(lldb::StopInfoSP &stop_info_sp)
Definition: StopInfo.cpp:1330
lldb_private::StopInfoBreakpoint::m_was_one_shot
bool m_was_one_shot
Definition: StopInfo.cpp:607
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb::eStopReasonPlanComplete
@ eStopReasonPlanComplete
Definition: lldb-enumerations.h:248
lldb_private::StopInfoVForkDone::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1236
lldb_private::StopInfo::MakeStopInfoValid
void MakeStopInfoValid()
Definition: StopInfo.cpp:44
lldb_private::StopInfoThreadPlan
Definition: StopInfo.cpp:1082
lldb_private::StopInfoBreakpoint::StopInfoBreakpoint
StopInfoBreakpoint(Thread &thread, break_id_t break_id, bool should_stop)
Definition: StopInfo.cpp:94
lldb_private::StopInfoProcessorTrace::~StopInfoProcessorTrace
~StopInfoProcessorTrace() override=default
lldb_private::StopInfoVForkDone::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:1238
lldb_private::StopInfoWatchpoint::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:713
lldb_private::StopInfoWatchpoint::WatchpointSentry::process_sp
ProcessSP process_sp
Definition: StopInfo.cpp:654
lldb_private::StopInfoBreakpoint::IsValidForOperatingSystemThread
bool IsValidForOperatingSystemThread(Thread &thread) override
Definition: StopInfo.cpp:122
StopInfo.h
lldb_private::StopInfoUnixSignal::ShouldStop
bool ShouldStop(Event *event_ptr) override
Definition: StopInfo.cpp:961
lldb::eStopReasonBreakpoint
@ eStopReasonBreakpoint
Definition: lldb-enumerations.h:243
lldb_private::StopInfo::m_description
std::string m_description
Definition: StopInfo.h:179
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:86
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::ExecutionContext::GetTargetRef
Target & GetTargetRef() const
Returns a reference to the target object.
Definition: ExecutionContext.cpp:226
lldb_private::StopInfo::GetCrashingDereference
static lldb::ValueObjectSP GetCrashingDereference(lldb::StopInfoSP &stop_info_sp, lldb::addr_t *crashing_address=nullptr)
Definition: StopInfo.cpp:1341
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::StopInfoUnixSignal::~StopInfoUnixSignal
~StopInfoUnixSignal() override=default
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb_private::StopInfoBreakpoint::m_should_perform_action
bool m_should_perform_action
Definition: StopInfo.cpp:598
lldb_private::Debugger::GetAsyncExecution
bool GetAsyncExecution()
Definition: Debugger.cpp:803
lldb_private::StopInfoProcessorTrace::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1068
lldb_private::StopInfo
Definition: StopInfo.h:20
Breakpoint.h
LIBLLDB_LOG_STEP
#define LIBLLDB_LOG_STEP
Definition: Logging.h:21
lldb_private::StopInfoThreadPlan::StopInfoThreadPlan
StopInfoThreadPlan(ThreadPlanSP &plan_sp, ValueObjectSP &return_valobj_sp, ExpressionVariableSP &expression_variable_sp)
Definition: StopInfo.cpp:1084
lldb_private::StopInfoVForkDone::m_performed_action
bool m_performed_action
Definition: StopInfo.cpp:1251
lldb_private::StopInfoWatchpoint::WatchpointSentry
Definition: StopInfo.cpp:616
lldb_private::StopInfoThreadPlan::~StopInfoThreadPlan
~StopInfoThreadPlan() override=default
lldb_private::Debugger::SetAsyncExecution
void SetAsyncExecution(bool async)
Definition: Debugger.cpp:807
lldb_private::StopInfo::CreateStopReasonVFork
static lldb::StopInfoSP CreateStopReasonVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
Definition: StopInfo.cpp:1310
lldb_private::StopInfoUnixSignal::GetDescription
const char * GetDescription() override
Definition: StopInfo.cpp:997
lldb_private::StopInfoWatchpoint::m_should_stop
bool m_should_stop
Definition: StopInfo.cpp:936
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::StopInfoBreakpoint::ShouldStopSynchronous
bool ShouldStopSynchronous(Event *event_ptr) override
Definition: StopInfo.cpp:135
lldb_private::StopInfo::CreateStopReasonWithBreakpointSiteID
static lldb::StopInfoSP CreateStopReasonWithBreakpointSiteID(Thread &thread, lldb::break_id_t break_id)
Definition: StopInfo.cpp:1256
lldb_private::Log
Definition: Log.h:49
lldb_private::StopInfoTrace::GetStopReason
StopReason GetStopReason() const override
Definition: StopInfo.cpp:1024
lldb_private::StopInfo::GetReturnValueObject
static lldb::ValueObjectSP GetReturnValueObject(lldb::StopInfoSP &stop_info_sp)
Definition: StopInfo.cpp:1320
lldb_private::GetLogIfAnyCategoriesSet
Log * GetLogIfAnyCategoriesSet(uint32_t mask)
Definition: Logging.cpp:62
lldb_private::StopInfo::CreateStopReasonWithException
static lldb::StopInfoSP CreateStopReasonWithException(Thread &thread, const char *description)
Definition: StopInfo.cpp:1289
lldb::eStopReasonVForkDone
@ eStopReasonVForkDone
Definition: lldb-enumerations.h:254
lldb_private::StopInfoBreakpoint::~StopInfoBreakpoint
~StopInfoBreakpoint() override=default
lldb_private::StopInfoUnixSignal::StopInfoUnixSignal
StopInfoUnixSignal(Thread &thread, int signo, const char *description)
Definition: StopInfo.cpp:945
lldb_private::StopInfo::SetDescription
virtual void SetDescription(const char *desc_cstr)
Definition: StopInfo.h:73
lldb_private::ProcessModID::IsLastResumeForUserExpression
bool IsLastResumeForUserExpression() const
Definition: Process.h:279
lldb
Definition: SBAddress.h:15
LIBLLDB_LOG_PROCESS
#define LIBLLDB_LOG_PROCESS
Definition: Logging.h:15
lldb_private::StopInfoTrace::~StopInfoTrace
~StopInfoTrace() override=default
lldb::eStateRunning
@ eStateRunning
Process or thread is running and can't be examined.
Definition: lldb-enumerations.h:85
lldb::eStopReasonFork
@ eStopReasonFork
Definition: lldb-enumerations.h:252
lldb_private::StopInfoFork::m_child_tid
lldb::tid_t m_child_tid
Definition: StopInfo.cpp:1188
lldb_private::StopInfoFork::PerformAction
void PerformAction(Event *event_ptr) override
Definition: StopInfo.cpp:1174
lldb::eDescriptionLevelBrief
@ eDescriptionLevelBrief
Definition: lldb-enumerations.h:208
lldb_private::StopInfoBreakpoint::m_should_stop
bool m_should_stop
Definition: StopInfo.cpp:596
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::StopInfoBreakpoint::m_should_stop_is_valid
bool m_should_stop_is_valid
Definition: StopInfo.cpp:597
lldb_private::Status::AsCString
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
Definition: Status.cpp:131