LLDB  mainline
SBBreakpointName.cpp
Go to the documentation of this file.
1 //===-- SBBreakpointName.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 
10 #include "SBReproducerPrivate.h"
11 #include "lldb/API/SBDebugger.h"
12 #include "lldb/API/SBError.h"
13 #include "lldb/API/SBStream.h"
14 #include "lldb/API/SBStringList.h"
16 #include "lldb/API/SBTarget.h"
17 
20 #include "lldb/Core/Debugger.h"
24 #include "lldb/Target/Target.h"
25 #include "lldb/Target/ThreadSpec.h"
26 #include "lldb/Utility/Stream.h"
27 
29 
30 using namespace lldb;
31 using namespace lldb_private;
32 
33 namespace lldb
34 {
36 public:
37  SBBreakpointNameImpl(TargetSP target_sp, const char *name) {
38  if (!name || name[0] == '\0')
39  return;
40  m_name.assign(name);
41 
42  if (!target_sp)
43  return;
44 
45  m_target_wp = target_sp;
46  }
47 
48  SBBreakpointNameImpl(SBTarget &sb_target, const char *name);
49  bool operator==(const SBBreakpointNameImpl &rhs);
50  bool operator!=(const SBBreakpointNameImpl &rhs);
51 
52  // For now we take a simple approach and only keep the name, and relook up
53  // the location when we need it.
54 
55  TargetSP GetTarget() const {
56  return m_target_wp.lock();
57  }
58 
59  const char *GetName() const {
60  return m_name.c_str();
61  }
62 
63  bool IsValid() const {
64  return !m_name.empty() && m_target_wp.lock();
65  }
66 
67  lldb_private::BreakpointName *GetBreakpointName() const;
68 
69 private:
70  TargetWP m_target_wp;
72 };
73 
75  const char *name) {
76  if (!name || name[0] == '\0')
77  return;
78  m_name.assign(name);
79 
80  if (!sb_target.IsValid())
81  return;
82 
83  TargetSP target_sp = sb_target.GetSP();
84  if (!target_sp)
85  return;
86 
87  m_target_wp = target_sp;
88 }
89 
91  return m_name == rhs.m_name && m_target_wp.lock() == rhs.m_target_wp.lock();
92 }
93 
95  return m_name != rhs.m_name || m_target_wp.lock() != rhs.m_target_wp.lock();
96 }
97 
99  if (!IsValid())
100  return nullptr;
101  TargetSP target_sp = GetTarget();
102  if (!target_sp)
103  return nullptr;
104  Status error;
105  return target_sp->FindBreakpointName(ConstString(m_name), true, error);
106 }
107 
108 } // namespace lldb
109 
112 }
113 
114 SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) {
116  sb_target, name);
117 
118  m_impl_up = std::make_unique<SBBreakpointNameImpl>(sb_target, name);
119  // Call FindBreakpointName here to make sure the name is valid, reset if not:
120  BreakpointName *bp_name = GetBreakpointName();
121  if (!bp_name)
122  m_impl_up.reset();
123 }
124 
127  (lldb::SBBreakpoint &, const char *), sb_bkpt, name);
128 
129  if (!sb_bkpt.IsValid()) {
130  m_impl_up.reset();
131  return;
132  }
133  BreakpointSP bkpt_sp = sb_bkpt.GetSP();
134  Target &target = bkpt_sp->GetTarget();
135 
136  m_impl_up =
137  std::make_unique<SBBreakpointNameImpl>(target.shared_from_this(), name);
138 
139  // Call FindBreakpointName here to make sure the name is valid, reset if not:
140  BreakpointName *bp_name = GetBreakpointName();
141  if (!bp_name) {
142  m_impl_up.reset();
143  return;
144  }
145 
146  // Now copy over the breakpoint's options:
147  target.ConfigureBreakpointName(*bp_name, bkpt_sp->GetOptions(),
149 }
150 
153  rhs);
154 
155  if (!rhs.m_impl_up)
156  return;
157  else
158  m_impl_up = std::make_unique<SBBreakpointNameImpl>(
159  rhs.m_impl_up->GetTarget(), rhs.m_impl_up->GetName());
160 }
161 
163 
167  const lldb::SBBreakpointName &,
168  SBBreakpointName, operator=,(const lldb::SBBreakpointName &), rhs);
169 
170  if (!rhs.m_impl_up) {
171  m_impl_up.reset();
172  return LLDB_RECORD_RESULT(*this);
173  }
174 
175  m_impl_up = std::make_unique<SBBreakpointNameImpl>(rhs.m_impl_up->GetTarget(),
176  rhs.m_impl_up->GetName());
177  return LLDB_RECORD_RESULT(*this);
178 }
179 
182  bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &), rhs);
183 
184  return *m_impl_up == *rhs.m_impl_up;
185 }
186 
189  bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &), rhs);
190 
191  return *m_impl_up != *rhs.m_impl_up;
192 }
193 
196  return this->operator bool();
197 }
198 SBBreakpointName::operator bool() const {
200 
201  if (!m_impl_up)
202  return false;
203  return m_impl_up->IsValid();
204 }
205 
206 const char *SBBreakpointName::GetName() const {
208 
209  if (!m_impl_up)
210  return "<Invalid Breakpoint Name Object>";
211  return m_impl_up->GetName();
212 }
213 
214 void SBBreakpointName::SetEnabled(bool enable) {
215  LLDB_RECORD_METHOD(void, SBBreakpointName, SetEnabled, (bool), enable);
216 
217  BreakpointName *bp_name = GetBreakpointName();
218  if (!bp_name)
219  return;
220 
221  std::lock_guard<std::recursive_mutex> guard(
222  m_impl_up->GetTarget()->GetAPIMutex());
223 
224  bp_name->GetOptions().SetEnabled(enable);
225 }
226 
228  if (!IsValid())
229  return;
230 
231  TargetSP target_sp = m_impl_up->GetTarget();
232  if (!target_sp)
233  return;
234  target_sp->ApplyNameToBreakpoints(bp_name);
235 
236 }
237 
240 
241  BreakpointName *bp_name = GetBreakpointName();
242  if (!bp_name)
243  return false;
244 
245  std::lock_guard<std::recursive_mutex> guard(
246  m_impl_up->GetTarget()->GetAPIMutex());
247 
248  return bp_name->GetOptions().IsEnabled();
249 }
250 
251 void SBBreakpointName::SetOneShot(bool one_shot) {
252  LLDB_RECORD_METHOD(void, SBBreakpointName, SetOneShot, (bool), one_shot);
253 
254  BreakpointName *bp_name = GetBreakpointName();
255  if (!bp_name)
256  return;
257 
258  std::lock_guard<std::recursive_mutex> guard(
259  m_impl_up->GetTarget()->GetAPIMutex());
260 
261  bp_name->GetOptions().SetOneShot(one_shot);
262  UpdateName(*bp_name);
263 }
264 
267 
268  const BreakpointName *bp_name = GetBreakpointName();
269  if (!bp_name)
270  return false;
271 
272  std::lock_guard<std::recursive_mutex> guard(
273  m_impl_up->GetTarget()->GetAPIMutex());
274 
275  return bp_name->GetOptions().IsOneShot();
276 }
277 
279  LLDB_RECORD_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t), count);
280 
281  BreakpointName *bp_name = GetBreakpointName();
282  if (!bp_name)
283  return;
284 
285  std::lock_guard<std::recursive_mutex> guard(
286  m_impl_up->GetTarget()->GetAPIMutex());
287 
288  bp_name->GetOptions().SetIgnoreCount(count);
289  UpdateName(*bp_name);
290 }
291 
294 
295  BreakpointName *bp_name = GetBreakpointName();
296  if (!bp_name)
297  return false;
298 
299  std::lock_guard<std::recursive_mutex> guard(
300  m_impl_up->GetTarget()->GetAPIMutex());
301 
302  return bp_name->GetOptions().GetIgnoreCount();
303 }
304 
305 void SBBreakpointName::SetCondition(const char *condition) {
306  LLDB_RECORD_METHOD(void, SBBreakpointName, SetCondition, (const char *),
307  condition);
308 
309  BreakpointName *bp_name = GetBreakpointName();
310  if (!bp_name)
311  return;
312 
313  std::lock_guard<std::recursive_mutex> guard(
314  m_impl_up->GetTarget()->GetAPIMutex());
315 
316  bp_name->GetOptions().SetCondition(condition);
317  UpdateName(*bp_name);
318 }
319 
321  LLDB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpointName, GetCondition);
322 
323  BreakpointName *bp_name = GetBreakpointName();
324  if (!bp_name)
325  return nullptr;
326 
327  std::lock_guard<std::recursive_mutex> guard(
328  m_impl_up->GetTarget()->GetAPIMutex());
329 
330  return bp_name->GetOptions().GetConditionText();
331 }
332 
333 void SBBreakpointName::SetAutoContinue(bool auto_continue) {
334  LLDB_RECORD_METHOD(void, SBBreakpointName, SetAutoContinue, (bool),
335  auto_continue);
336 
337  BreakpointName *bp_name = GetBreakpointName();
338  if (!bp_name)
339  return;
340 
341  std::lock_guard<std::recursive_mutex> guard(
342  m_impl_up->GetTarget()->GetAPIMutex());
343 
344  bp_name->GetOptions().SetAutoContinue(auto_continue);
345  UpdateName(*bp_name);
346 }
347 
349  LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAutoContinue);
350 
351  BreakpointName *bp_name = GetBreakpointName();
352  if (!bp_name)
353  return false;
354 
355  std::lock_guard<std::recursive_mutex> guard(
356  m_impl_up->GetTarget()->GetAPIMutex());
357 
358  return bp_name->GetOptions().IsAutoContinue();
359 }
360 
362  LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t), tid);
363 
364  BreakpointName *bp_name = GetBreakpointName();
365  if (!bp_name)
366  return;
367 
368  std::lock_guard<std::recursive_mutex> guard(
369  m_impl_up->GetTarget()->GetAPIMutex());
370 
371  bp_name->GetOptions().SetThreadID(tid);
372  UpdateName(*bp_name);
373 }
374 
377 
378  BreakpointName *bp_name = GetBreakpointName();
379  if (!bp_name)
380  return LLDB_INVALID_THREAD_ID;
381 
382  std::lock_guard<std::recursive_mutex> guard(
383  m_impl_up->GetTarget()->GetAPIMutex());
384 
385  return bp_name->GetOptions().GetThreadSpec()->GetTID();
386 }
387 
389  LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t), index);
390 
391  BreakpointName *bp_name = GetBreakpointName();
392  if (!bp_name)
393  return;
394 
395  std::lock_guard<std::recursive_mutex> guard(
396  m_impl_up->GetTarget()->GetAPIMutex());
397 
398  bp_name->GetOptions().GetThreadSpec()->SetIndex(index);
399  UpdateName(*bp_name);
400 }
401 
404 
405  BreakpointName *bp_name = GetBreakpointName();
406  if (!bp_name)
407  return LLDB_INVALID_THREAD_ID;
408 
409  std::lock_guard<std::recursive_mutex> guard(
410  m_impl_up->GetTarget()->GetAPIMutex());
411 
412  return bp_name->GetOptions().GetThreadSpec()->GetIndex();
413 }
414 
415 void SBBreakpointName::SetThreadName(const char *thread_name) {
416  LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadName, (const char *),
417  thread_name);
418 
419  BreakpointName *bp_name = GetBreakpointName();
420  if (!bp_name)
421  return;
422 
423  std::lock_guard<std::recursive_mutex> guard(
424  m_impl_up->GetTarget()->GetAPIMutex());
425 
426  bp_name->GetOptions().GetThreadSpec()->SetName(thread_name);
427  UpdateName(*bp_name);
428 }
429 
430 const char *SBBreakpointName::GetThreadName() const {
432  GetThreadName);
433 
434  BreakpointName *bp_name = GetBreakpointName();
435  if (!bp_name)
436  return nullptr;
437 
438  std::lock_guard<std::recursive_mutex> guard(
439  m_impl_up->GetTarget()->GetAPIMutex());
440 
441  return bp_name->GetOptions().GetThreadSpec()->GetName();
442 }
443 
444 void SBBreakpointName::SetQueueName(const char *queue_name) {
445  LLDB_RECORD_METHOD(void, SBBreakpointName, SetQueueName, (const char *),
446  queue_name);
447 
448  BreakpointName *bp_name = GetBreakpointName();
449  if (!bp_name)
450  return;
451 
452  std::lock_guard<std::recursive_mutex> guard(
453  m_impl_up->GetTarget()->GetAPIMutex());
454 
455  bp_name->GetOptions().GetThreadSpec()->SetQueueName(queue_name);
456  UpdateName(*bp_name);
457 }
458 
459 const char *SBBreakpointName::GetQueueName() const {
461  GetQueueName);
462 
463  BreakpointName *bp_name = GetBreakpointName();
464  if (!bp_name)
465  return nullptr;
466 
467  std::lock_guard<std::recursive_mutex> guard(
468  m_impl_up->GetTarget()->GetAPIMutex());
469 
470  return bp_name->GetOptions().GetThreadSpec()->GetQueueName();
471 }
472 
474  LLDB_RECORD_METHOD(void, SBBreakpointName, SetCommandLineCommands,
475  (lldb::SBStringList &), commands);
476 
477  BreakpointName *bp_name = GetBreakpointName();
478  if (!bp_name)
479  return;
480  if (commands.GetSize() == 0)
481  return;
482 
483 
484  std::lock_guard<std::recursive_mutex> guard(
485  m_impl_up->GetTarget()->GetAPIMutex());
486  std::unique_ptr<BreakpointOptions::CommandData> cmd_data_up(
488 
489  bp_name->GetOptions().SetCommandDataCallback(cmd_data_up);
490  UpdateName(*bp_name);
491 }
492 
494  LLDB_RECORD_METHOD(bool, SBBreakpointName, GetCommandLineCommands,
495  (lldb::SBStringList &), commands);
496 
497  BreakpointName *bp_name = GetBreakpointName();
498  if (!bp_name)
499  return false;
500 
501  StringList command_list;
502  bool has_commands =
503  bp_name->GetOptions().GetCommandLineCallbacks(command_list);
504  if (has_commands)
505  commands.AppendList(command_list);
506  return has_commands;
507 }
508 
509 const char *SBBreakpointName::GetHelpString() const {
511  GetHelpString);
512 
513  BreakpointName *bp_name = GetBreakpointName();
514  if (!bp_name)
515  return "";
516 
517  return bp_name->GetHelp();
518 }
519 
520 void SBBreakpointName::SetHelpString(const char *help_string) {
521  LLDB_RECORD_METHOD(void, SBBreakpointName, SetHelpString, (const char *),
522  help_string);
523 
524  BreakpointName *bp_name = GetBreakpointName();
525  if (!bp_name)
526  return;
527 
528 
529  std::lock_guard<std::recursive_mutex> guard(
530  m_impl_up->GetTarget()->GetAPIMutex());
531  bp_name->SetHelp(help_string);
532 }
533 
535  LLDB_RECORD_METHOD(bool, SBBreakpointName, GetDescription, (lldb::SBStream &),
536  s);
537 
538  BreakpointName *bp_name = GetBreakpointName();
539  if (!bp_name)
540  {
541  s.Printf("No value");
542  return false;
543  }
544 
545  std::lock_guard<std::recursive_mutex> guard(
546  m_impl_up->GetTarget()->GetAPIMutex());
548  return true;
549 }
550 
552  void *baton) {
553  LLDB_RECORD_DUMMY(void, SBBreakpointName, SetCallback,
554  (lldb::SBBreakpointHitCallback, void *), callback, baton);
555 
556  BreakpointName *bp_name = GetBreakpointName();
557  if (!bp_name)
558  return;
559  std::lock_guard<std::recursive_mutex> guard(
560  m_impl_up->GetTarget()->GetAPIMutex());
561 
562  BatonSP baton_sp(new SBBreakpointCallbackBaton(callback, baton));
564  ::PrivateBreakpointHitCallback,
565  baton_sp,
566  false);
567  UpdateName(*bp_name);
568 }
569 
571  const char *callback_function_name) {
572 LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
573  (const char *), callback_function_name);
574  SBStructuredData empty_args;
575  SetScriptCallbackFunction(callback_function_name, empty_args);
576 }
577 
579  const char *callback_function_name,
580  SBStructuredData &extra_args) {
581  LLDB_RECORD_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction,
582  (const char *, SBStructuredData &),
583  callback_function_name, extra_args);
584  SBError sb_error;
585  BreakpointName *bp_name = GetBreakpointName();
586  if (!bp_name) {
587  sb_error.SetErrorString("unrecognized breakpoint name");
588  return LLDB_RECORD_RESULT(sb_error);
589  }
590 
591  std::lock_guard<std::recursive_mutex> guard(
592  m_impl_up->GetTarget()->GetAPIMutex());
593 
594  BreakpointOptions &bp_options = bp_name->GetOptions();
595  Status error;
596  error = m_impl_up->GetTarget()
597  ->GetDebugger()
598  .GetScriptInterpreter()
599  ->SetBreakpointCommandCallbackFunction(
600  bp_options, callback_function_name,
601  extra_args.m_impl_up->GetObjectSP());
602  sb_error.SetError(error);
603  UpdateName(*bp_name);
604  return LLDB_RECORD_RESULT(sb_error);
605 }
606 
607 SBError
608 SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) {
609  LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody,
610  (const char *), callback_body_text);
611 
612  SBError sb_error;
613  BreakpointName *bp_name = GetBreakpointName();
614  if (!bp_name)
615  return LLDB_RECORD_RESULT(sb_error);
616 
617  std::lock_guard<std::recursive_mutex> guard(
618  m_impl_up->GetTarget()->GetAPIMutex());
619 
620  BreakpointOptions &bp_options = bp_name->GetOptions();
621  Status error =
622  m_impl_up->GetTarget()
623  ->GetDebugger()
624  .GetScriptInterpreter()
625  ->SetBreakpointCommandCallback(bp_options, callback_body_text);
626  sb_error.SetError(error);
627  if (!sb_error.Fail())
628  UpdateName(*bp_name);
629 
630  return LLDB_RECORD_RESULT(sb_error);
631 }
632 
635 
636  BreakpointName *bp_name = GetBreakpointName();
637  if (!bp_name)
638  return false;
639  return bp_name->GetPermissions().GetAllowList();
640 }
641 
643  LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowList, (bool), value);
644 
645 
646  BreakpointName *bp_name = GetBreakpointName();
647  if (!bp_name)
648  return;
649  bp_name->GetPermissions().SetAllowList(value);
650 }
651 
653  LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDelete);
654 
655  BreakpointName *bp_name = GetBreakpointName();
656  if (!bp_name)
657  return false;
658  return bp_name->GetPermissions().GetAllowDelete();
659 }
660 
662  LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDelete, (bool), value);
663 
664 
665  BreakpointName *bp_name = GetBreakpointName();
666  if (!bp_name)
667  return;
668  bp_name->GetPermissions().SetAllowDelete(value);
669 }
670 
672  LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDisable);
673 
674  BreakpointName *bp_name = GetBreakpointName();
675  if (!bp_name)
676  return false;
677  return bp_name->GetPermissions().GetAllowDisable();
678 }
679 
681  LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDisable, (bool), value);
682 
683  BreakpointName *bp_name = GetBreakpointName();
684  if (!bp_name)
685  return;
686  bp_name->GetPermissions().SetAllowDisable(value);
687 }
688 
690 {
691  if (!IsValid())
692  return nullptr;
693  return m_impl_up->GetBreakpointName();
694 }
695 
696 
697 namespace lldb_private {
698 namespace repro {
699 
700 template <>
704  (lldb::SBTarget &, const char *));
706  (lldb::SBBreakpoint &, const char *));
708  (const lldb::SBBreakpointName &));
710  const lldb::SBBreakpointName &,
711  SBBreakpointName, operator=,(const lldb::SBBreakpointName &));
713  bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &));
715  bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &));
716  LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsValid, ());
717  LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, operator bool, ());
719  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetEnabled, (bool));
720  LLDB_REGISTER_METHOD(bool, SBBreakpointName, IsEnabled, ());
721  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetOneShot, (bool));
722  LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsOneShot, ());
723  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t));
725  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetCondition, (const char *));
726  LLDB_REGISTER_METHOD(const char *, SBBreakpointName, GetCondition, ());
727  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAutoContinue, (bool));
728  LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAutoContinue, ());
729  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t));
731  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t));
733  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadName, (const char *));
734  LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetThreadName,
735  ());
736  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetQueueName, (const char *));
737  LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetQueueName,
738  ());
739  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetCommandLineCommands,
740  (lldb::SBStringList &));
741  LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetCommandLineCommands,
742  (lldb::SBStringList &));
743  LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetHelpString,
744  ());
745  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetHelpString, (const char *));
746  LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetDescription,
747  (lldb::SBStream &));
748  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
749  (const char *));
750  LLDB_REGISTER_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction,
751  (const char *, SBStructuredData &));
752  LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody,
753  (const char *));
754  LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, GetAllowList, ());
755  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowList, (bool));
756  LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDelete, ());
757  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDelete, (bool));
758  LLDB_REGISTER_METHOD(bool, SBBreakpointName, GetAllowDisable, ());
759  LLDB_REGISTER_METHOD(void, SBBreakpointName, SetAllowDisable, (bool));
760 }
761 
762 }
763 }
lldb::SBStringList
Definition: SBStringList.h:16
lldb_private::Target::ConfigureBreakpointName
void ConfigureBreakpointName(BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions)
Definition: Target.cpp:734
BreakpointName.h
lldb_private::BreakpointOptions::GetThreadSpec
ThreadSpec * GetThreadSpec()
Returns a pointer to the ThreadSpec for this option, creating it.
Definition: BreakpointOptions.cpp:508
lldb::SBTarget::IsValid
bool IsValid() const
Definition: SBTarget.cpp:162
lldb::SBStringList::GetSize
uint32_t GetSize() const
Definition: SBStringList.cpp:102
lldb::SBBreakpointName::operator==
bool operator==(const lldb::SBBreakpointName &rhs)
Definition: SBBreakpointName.cpp:180
lldb::SBBreakpointName::GetHelpString
const char * GetHelpString() const
Definition: SBBreakpointName.cpp:509
lldb_private::BreakpointOptions::SetIgnoreCount
void SetIgnoreCount(uint32_t n)
Set the breakpoint to ignore the next count breakpoint hits.
Definition: BreakpointOptions.h:300
lldb::SBStream::Printf
void Printf(const char *format,...) __attribute__((format(printf
Definition: SBStream.cpp:69
lldb_private::BreakpointOptions::CommandData
Definition: BreakpointOptions.h:45
lldb::SBBreakpointNameImpl::m_target_wp
TargetWP m_target_wp
Definition: SBBreakpointName.cpp:70
lldb::SBBreakpointName::GetQueueName
const char * GetQueueName() const
Definition: SBBreakpointName.cpp:459
lldb::SBBreakpointName::SBBreakpointName
SBBreakpointName()
Definition: SBBreakpointName.cpp:110
lldb::SBBreakpointName::m_impl_up
std::unique_ptr< SBBreakpointNameImpl > m_impl_up
Definition: SBBreakpointName.h:117
LLDB_RECORD_RESULT
#define LLDB_RECORD_RESULT(Result)
Definition: ReproducerInstrumentation.h:211
lldb::SBBreakpointNameImpl::IsValid
bool IsValid() const
Definition: SBBreakpointName.cpp:63
lldb_private::BreakpointOptions::SetCondition
void SetCondition(const char *condition)
Set the breakpoint option's condition.
Definition: BreakpointOptions.cpp:480
LLDB_RECORD_METHOD_CONST_NO_ARGS
#define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method)
Definition: ReproducerInstrumentation.h:168
lldb::SBError
Definition: SBError.h:20
SBBreakpointOptionCommon.h
lldb_private::BreakpointOptions::GetConditionText
const char * GetConditionText(size_t *hash=nullptr) const
Return a pointer to the text of the condition expression.
Definition: BreakpointOptions.cpp:493
SBStringList.h
lldb_private::repro::RegisterMethods< SBBreakpointName >
void RegisterMethods< SBBreakpointName >(Registry &R)
Definition: SBBreakpointName.cpp:701
lldb_private::BreakpointName::Permissions::GetAllowDelete
bool GetAllowDelete() const
Definition: BreakpointName.h:90
LLDB_RECORD_METHOD_NO_ARGS
#define LLDB_RECORD_METHOD_NO_ARGS(Result, Class, Method)
Definition: ReproducerInstrumentation.h:165
lldb::SBBreakpointName::SetCallback
void SetCallback(SBBreakpointHitCallback callback, void *baton)
Definition: SBBreakpointName.cpp:551
lldb_private::BreakpointOptions::SetThreadID
void SetThreadID(lldb::tid_t thread_id)
Definition: BreakpointOptions.cpp:517
lldb::SBBreakpointName::SetIgnoreCount
void SetIgnoreCount(uint32_t count)
Definition: SBBreakpointName.cpp:278
StoppointCallbackContext.h
lldb_private::BreakpointOptions::SetEnabled
void SetEnabled(bool enabled)
If enable is true, enable the breakpoint, if false disable it.
Definition: BreakpointOptions.h:270
LLDB_RECORD_CONSTRUCTOR_NO_ARGS
#define LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Class)
Definition: ReproducerInstrumentation.h:136
lldb::SBBreakpointNameImpl::SBBreakpointNameImpl
SBBreakpointNameImpl(TargetSP target_sp, const char *name)
Definition: SBBreakpointName.cpp:37
LLDB_REGISTER_METHOD_CONST
#define LLDB_REGISTER_METHOD_CONST(Result, Class, Method, Signature)
Definition: ReproducerInstrumentation.h:98
lldb::SBBreakpointName::GetName
const char * GetName() const
Definition: SBBreakpointName.cpp:206
lldb_private::BreakpointName::GetDescription
bool GetDescription(Stream *s, lldb::DescriptionLevel level)
Definition: BreakpointName.cpp:56
lldb_private::BreakpointName
Definition: BreakpointName.h:30
lldb_private::BreakpointOptions::IsEnabled
bool IsEnabled() const
Check the Enable/Disable state.
Definition: BreakpointOptions.h:267
SBReproducerPrivate.h
lldb::SBBreakpointName::GetAllowList
bool GetAllowList() const
Definition: SBBreakpointName.cpp:633
LLDB_REGISTER_CONSTRUCTOR
#define LLDB_REGISTER_CONSTRUCTOR(Class, Signature)
Definition: ReproducerInstrumentation.h:89
lldb::SBBreakpointName::GetCondition
const char * GetCondition()
Definition: SBBreakpointName.cpp:320
lldb::SBBreakpointName::~SBBreakpointName
~SBBreakpointName()
lldb::SBBreakpointName::SetAllowDelete
void SetAllowDelete(bool value)
Definition: SBBreakpointName.cpp:661
Debugger.h
lldb_private::Target
Definition: Target.h:451
lldb::SBBreakpointName::SetScriptCallbackBody
SBError SetScriptCallbackBody(const char *script_body_text)
Definition: SBBreakpointName.cpp:608
lldb::SBStructuredData::m_impl_up
StructuredDataImplUP m_impl_up
Definition: SBStructuredData.h:104
lldb_private::BreakpointOptions::SetAutoContinue
void SetAutoContinue(bool auto_continue)
Set the auto-continue state.
Definition: BreakpointOptions.h:281
lldb::SBBreakpointNameImpl
class LLDB_API SBBreakpointNameImpl
Definition: SBDefines.h:26
lldb::eScriptLanguageNone
@ eScriptLanguageNone
Definition: lldb-enumerations.h:217
lldb::SBBreakpointName::GetCommandLineCommands
bool GetCommandLineCommands(lldb::SBStringList &commands)
Definition: SBBreakpointName.cpp:493
SBBreakpointName.h
Target.h
lldb::SBTarget
Definition: SBTarget.h:29
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
SBStream.h
lldb::SBBreakpointNameImpl::operator==
bool operator==(const SBBreakpointNameImpl &rhs)
Definition: SBBreakpointName.cpp:90
lldb::SBError::Fail
bool Fail() const
Definition: SBError.cpp:54
lldb::SBStream::get
lldb_private::Stream * get()
Definition: SBStream.cpp:176
lldb::SBBreakpointName::SetAutoContinue
void SetAutoContinue(bool auto_continue)
Definition: SBBreakpointName.cpp:333
LLDB_RECORD_METHOD
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature,...)
Definition: ReproducerInstrumentation.h:158
lldb::SBBreakpointName::SetEnabled
void SetEnabled(bool enable)
Definition: SBBreakpointName.cpp:214
ThreadSpec.h
lldb_private::BreakpointName::SetHelp
void SetHelp(const char *description)
Definition: BreakpointName.h:181
lldb::SBBreakpointName::SetQueueName
void SetQueueName(const char *queue_name)
Definition: SBBreakpointName.cpp:444
lldb_private::BreakpointOptions::SetCallback
void SetCallback(BreakpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous=false)
Adds a callback to the breakpoint option set.
Definition: BreakpointOptions.cpp:402
lldb::SBBreakpoint::IsValid
bool IsValid() const
Definition: SBBreakpoint.cpp:105
GetName
static llvm::StringRef GetName(XcodeSDK::Type type)
Definition: XcodeSDK.cpp:21
lldb::SBBreakpointCallbackBaton
Definition: SBBreakpointOptionCommon.h:22
lldb_private::ThreadSpec::SetQueueName
void SetQueueName(llvm::StringRef queue_name)
Definition: ThreadSpec.h:51
lldb::SBBreakpointNameImpl::GetTarget
TargetSP GetTarget() const
Definition: SBBreakpointName.cpp:55
lldb::SBBreakpointName::GetThreadName
const char * GetThreadName() const
Definition: SBBreakpointName.cpp:430
lldb::SBBreakpointName::SetThreadIndex
void SetThreadIndex(uint32_t index)
Definition: SBBreakpointName.cpp:388
lldb_private::BreakpointName::Permissions
Definition: BreakpointName.h:32
lldb::SBBreakpointName::UpdateName
void UpdateName(lldb_private::BreakpointName &bp_name)
Definition: SBBreakpointName.cpp:227
lldb_private::StringList
Definition: StringList.h:25
lldb_private::ConstString
Definition: ConstString.h:40
lldb::SBError::SetErrorString
void SetErrorString(const char *err_str)
Definition: SBError.cpp:124
lldb_private::BreakpointOptions
Definition: BreakpointOptions.h:27
lldb::eDescriptionLevelFull
@ eDescriptionLevelFull
Definition: lldb-enumerations.h:209
lldb::SBBreakpointName::SetAllowList
void SetAllowList(bool value)
Definition: SBBreakpointName.cpp:642
lldb_private::BreakpointName::Permissions::GetAllowList
bool GetAllowList() const
Definition: BreakpointName.h:87
lldb::operator==
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition: SBAddress.cpp:63
lldb_private::ThreadSpec::SetIndex
void SetIndex(uint32_t index)
Definition: ThreadSpec.h:45
lldb::SBBreakpointName::SetCommandLineCommands
void SetCommandLineCommands(lldb::SBStringList &commands)
Definition: SBBreakpointName.cpp:473
lldb::SBBreakpointName::operator!=
bool operator!=(const lldb::SBBreakpointName &rhs)
Definition: SBBreakpointName.cpp:187
SBDebugger.h
lldb::SBBreakpointName::IsValid
bool IsValid() const
Definition: SBBreakpointName.cpp:194
lldb::SBBreakpointNameImpl::operator!=
bool operator!=(const SBBreakpointNameImpl &rhs)
Definition: SBBreakpointName.cpp:94
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb::SBError::SetError
void SetError(uint32_t err, lldb::ErrorType type)
Definition: SBError.cpp:97
lldb::SBBreakpointNameImpl
Definition: SBBreakpointName.cpp:35
lldb_private::BreakpointOptions::SetCommandDataCallback
void SetCommandDataCallback(std::unique_ptr< CommandData > &cmd_data)
Set a callback based on BreakpointOptions::CommandData.
Definition: BreakpointOptions.cpp:610
lldb::SBBreakpointName::GetAutoContinue
bool GetAutoContinue()
Definition: SBBreakpointName.cpp:348
lldb_private::operator!=
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1005
lldb_private::BreakpointName::Permissions::SetAllowList
bool SetAllowList(bool value)
Definition: BreakpointName.h:88
lldb::SBBreakpointName::IsOneShot
bool IsOneShot() const
Definition: SBBreakpointName.cpp:265
LLDB_RECORD_CONSTRUCTOR
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature,...)
Definition: ReproducerInstrumentation.h:133
lldb::SBBreakpointName::GetIgnoreCount
uint32_t GetIgnoreCount() const
Definition: SBBreakpointName.cpp:292
lldb_private::repro::Registry
The registry contains a unique mapping between functions and their ID.
Definition: ReproducerInstrumentation.h:517
lldb_private::ThreadSpec::GetName
const char * GetName() const
Definition: ThreadSpec.cpp:68
lldb::SBBreakpointHitCallback
bool(* SBBreakpointHitCallback)(void *baton, SBProcess &process, SBThread &thread, lldb::SBBreakpointLocation &location)
Definition: SBDefines.h:97
lldb_private::ThreadSpec::GetIndex
uint32_t GetIndex() const
Definition: ThreadSpec.h:55
lldb::SBBreakpointName::GetAllowDisable
bool GetAllowDisable()
Definition: SBBreakpointName.cpp:671
lldb::SBBreakpointName::operator=
const lldb::SBBreakpointName & operator=(const lldb::SBBreakpointName &rhs)
Definition: SBBreakpointName.cpp:165
lldb::SBBreakpointName::GetDescription
bool GetDescription(lldb::SBStream &description)
Definition: SBBreakpointName.cpp:534
lldb::SBBreakpointNameImpl::m_name
std::string m_name
Definition: SBBreakpointName.cpp:71
lldb_private::Status
Definition: Status.h:44
lldb::SBBreakpointName::GetThreadIndex
uint32_t GetThreadIndex() const
Definition: SBBreakpointName.cpp:402
lldb_private::ThreadSpec::GetQueueName
const char * GetQueueName() const
Definition: ThreadSpec.cpp:72
lldb::SBBreakpointName::GetThreadID
lldb::tid_t GetThreadID()
Definition: SBBreakpointName.cpp:375
lldb::SBBreakpointName::SetScriptCallbackFunction
void SetScriptCallbackFunction(const char *callback_function_name)
Definition: SBBreakpointName.cpp:570
uint32_t
lldb::SBStructuredData
Definition: SBStructuredData.h:17
lldb::SBBreakpoint
Definition: SBBreakpoint.h:18
lldb::SBBreakpointName::SetOneShot
void SetOneShot(bool one_shot)
Definition: SBBreakpointName.cpp:251
lldb_private::ThreadSpec::SetName
void SetName(llvm::StringRef name)
Definition: ThreadSpec.h:49
lldb_private::BreakpointOptions::SetOneShot
void SetOneShot(bool one_shot)
If enable is true, enable the breakpoint, if false disable it.
Definition: BreakpointOptions.h:292
lldb::SBBreakpointName::SetThreadID
void SetThreadID(lldb::tid_t sb_thread_id)
Definition: SBBreakpointName.cpp:361
lldb_private::BreakpointName::Permissions::SetAllowDisable
bool SetAllowDisable(bool value)
Definition: BreakpointName.h:94
lldb::SBBreakpointName::SetCondition
void SetCondition(const char *condition)
Definition: SBBreakpointName.cpp:305
lldb_private::BreakpointOptions::IsOneShot
bool IsOneShot() const
Check the One-shot state.
Definition: BreakpointOptions.h:289
lldb::SBBreakpointNameImpl::GetBreakpointName
lldb_private::BreakpointName * GetBreakpointName() const
Definition: SBBreakpointName.cpp:98
SBStructuredData.h
StructuredDataImpl.h
lldb::SBBreakpointName::GetAllowDelete
bool GetAllowDelete()
Definition: SBBreakpointName.cpp:652
lldb_private::BreakpointOptions::GetIgnoreCount
uint32_t GetIgnoreCount() const
Return the current Ignore Count.
Definition: BreakpointOptions.h:308
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::BreakpointName::GetPermissions
Permissions & GetPermissions()
Definition: BreakpointName.h:170
lldb::SBBreakpoint::GetSP
lldb::BreakpointSP GetSP() const
Definition: SBBreakpoint.cpp:819
lldb_private::BreakpointOptions::IsAutoContinue
bool IsAutoContinue() const
Check the auto-continue state.
Definition: BreakpointOptions.h:278
lldb_private::BreakpointName::GetHelp
const char * GetHelp()
Definition: BreakpointName.h:189
lldb::SBBreakpointName::GetBreakpointName
lldb_private::BreakpointName * GetBreakpointName() const
Definition: SBBreakpointName.cpp:689
lldb::SBBreakpointName::IsEnabled
bool IsEnabled()
Definition: SBBreakpointName.cpp:238
lldb::SBTarget::GetSP
lldb::TargetSP GetSP() const
Definition: SBTarget.cpp:605
CommandInterpreter.h
lldb::SBBreakpointName::SetAllowDisable
void SetAllowDisable(bool value)
Definition: SBBreakpointName.cpp:680
lldb_private::ThreadSpec::GetTID
lldb::tid_t GetTID() const
Definition: ThreadSpec.h:57
LLDB_INVALID_THREAD_ID
#define LLDB_INVALID_THREAD_ID
Definition: lldb-defines.h:94
Stream.h
lldb::SBBreakpointName::SetThreadName
void SetThreadName(const char *thread_name)
Definition: SBBreakpointName.cpp:415
LLDB_RECORD_DUMMY
#define LLDB_RECORD_DUMMY(Result, Class, Method, Signature,...)
The LLDB_RECORD_DUMMY macro is special because it doesn't actually record anything.
Definition: ReproducerInstrumentation.h:216
lldb::SBStream
Definition: SBStream.h:18
lldb_private::BreakpointName::Permissions::GetAllowDisable
bool GetAllowDisable() const
Definition: BreakpointName.h:93
lldb_private::BreakpointOptions::GetCommandLineCallbacks
bool GetCommandLineCallbacks(StringList &command_list)
Returns the command line commands for the callback on this breakpoint.
Definition: BreakpointOptions.cpp:466
SBTarget.h
ScriptInterpreter.h
lldb::SBBreakpointName
Definition: SBBreakpointName.h:18
lldb
Definition: SBAddress.h:15
lldb::SBBreakpointNameImpl::GetName
const char * GetName() const
Definition: SBBreakpointName.cpp:59
lldb_private::BreakpointName::GetOptions
BreakpointOptions & GetOptions()
Definition: BreakpointName.h:163
SBError.h
lldb::SBStringList::AppendList
void AppendList(const char **strv, int strc)
Definition: SBStringList.cpp:73
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::BreakpointName::Permissions::SetAllowDelete
bool SetAllowDelete(bool value)
Definition: BreakpointName.h:91
LLDB_REGISTER_METHOD
#define LLDB_REGISTER_METHOD(Result, Class, Method, Signature)
Definition: ReproducerInstrumentation.h:93
lldb::SBBreakpointName::SetHelpString
void SetHelpString(const char *help_string)
Definition: SBBreakpointName.cpp:520