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 "lldb/API/SBDebugger.h"
11 #include "lldb/API/SBError.h"
12 #include "lldb/API/SBStream.h"
13 #include "lldb/API/SBStringList.h"
15 #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 
111 
112 SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) {
113  LLDB_INSTRUMENT_VA(this, sb_target, name);
114 
115  m_impl_up = std::make_unique<SBBreakpointNameImpl>(sb_target, name);
116  // Call FindBreakpointName here to make sure the name is valid, reset if not:
117  BreakpointName *bp_name = GetBreakpointName();
118  if (!bp_name)
119  m_impl_up.reset();
120 }
121 
123  LLDB_INSTRUMENT_VA(this, sb_bkpt, name);
124 
125  if (!sb_bkpt.IsValid()) {
126  m_impl_up.reset();
127  return;
128  }
129  BreakpointSP bkpt_sp = sb_bkpt.GetSP();
130  Target &target = bkpt_sp->GetTarget();
131 
132  m_impl_up =
133  std::make_unique<SBBreakpointNameImpl>(target.shared_from_this(), name);
134 
135  // Call FindBreakpointName here to make sure the name is valid, reset if not:
136  BreakpointName *bp_name = GetBreakpointName();
137  if (!bp_name) {
138  m_impl_up.reset();
139  return;
140  }
141 
142  // Now copy over the breakpoint's options:
143  target.ConfigureBreakpointName(*bp_name, bkpt_sp->GetOptions(),
145 }
146 
148  LLDB_INSTRUMENT_VA(this, rhs);
149 
150  if (!rhs.m_impl_up)
151  return;
152  else
153  m_impl_up = std::make_unique<SBBreakpointNameImpl>(
154  rhs.m_impl_up->GetTarget(), rhs.m_impl_up->GetName());
155 }
156 
158 
161  LLDB_INSTRUMENT_VA(this, rhs);
162 
163  if (!rhs.m_impl_up) {
164  m_impl_up.reset();
165  return *this;
166  }
167 
168  m_impl_up = std::make_unique<SBBreakpointNameImpl>(rhs.m_impl_up->GetTarget(),
169  rhs.m_impl_up->GetName());
170  return *this;
171 }
172 
174  LLDB_INSTRUMENT_VA(this, rhs);
175 
176  return *m_impl_up == *rhs.m_impl_up;
177 }
178 
180  LLDB_INSTRUMENT_VA(this, rhs);
181 
182  return *m_impl_up != *rhs.m_impl_up;
183 }
184 
186  LLDB_INSTRUMENT_VA(this);
187  return this->operator bool();
188 }
189 SBBreakpointName::operator bool() const {
190  LLDB_INSTRUMENT_VA(this);
191 
192  if (!m_impl_up)
193  return false;
194  return m_impl_up->IsValid();
195 }
196 
197 const char *SBBreakpointName::GetName() const {
198  LLDB_INSTRUMENT_VA(this);
199 
200  if (!m_impl_up)
201  return "<Invalid Breakpoint Name Object>";
202  return m_impl_up->GetName();
203 }
204 
205 void SBBreakpointName::SetEnabled(bool enable) {
206  LLDB_INSTRUMENT_VA(this, enable);
207 
208  BreakpointName *bp_name = GetBreakpointName();
209  if (!bp_name)
210  return;
211 
212  std::lock_guard<std::recursive_mutex> guard(
213  m_impl_up->GetTarget()->GetAPIMutex());
214 
215  bp_name->GetOptions().SetEnabled(enable);
216 }
217 
219  if (!IsValid())
220  return;
221 
222  TargetSP target_sp = m_impl_up->GetTarget();
223  if (!target_sp)
224  return;
225  target_sp->ApplyNameToBreakpoints(bp_name);
226 
227 }
228 
230  LLDB_INSTRUMENT_VA(this);
231 
232  BreakpointName *bp_name = GetBreakpointName();
233  if (!bp_name)
234  return false;
235 
236  std::lock_guard<std::recursive_mutex> guard(
237  m_impl_up->GetTarget()->GetAPIMutex());
238 
239  return bp_name->GetOptions().IsEnabled();
240 }
241 
242 void SBBreakpointName::SetOneShot(bool one_shot) {
243  LLDB_INSTRUMENT_VA(this, one_shot);
244 
245  BreakpointName *bp_name = GetBreakpointName();
246  if (!bp_name)
247  return;
248 
249  std::lock_guard<std::recursive_mutex> guard(
250  m_impl_up->GetTarget()->GetAPIMutex());
251 
252  bp_name->GetOptions().SetOneShot(one_shot);
253  UpdateName(*bp_name);
254 }
255 
257  LLDB_INSTRUMENT_VA(this);
258 
259  const BreakpointName *bp_name = GetBreakpointName();
260  if (!bp_name)
261  return false;
262 
263  std::lock_guard<std::recursive_mutex> guard(
264  m_impl_up->GetTarget()->GetAPIMutex());
265 
266  return bp_name->GetOptions().IsOneShot();
267 }
268 
270  LLDB_INSTRUMENT_VA(this, count);
271 
272  BreakpointName *bp_name = GetBreakpointName();
273  if (!bp_name)
274  return;
275 
276  std::lock_guard<std::recursive_mutex> guard(
277  m_impl_up->GetTarget()->GetAPIMutex());
278 
279  bp_name->GetOptions().SetIgnoreCount(count);
280  UpdateName(*bp_name);
281 }
282 
284  LLDB_INSTRUMENT_VA(this);
285 
286  BreakpointName *bp_name = GetBreakpointName();
287  if (!bp_name)
288  return false;
289 
290  std::lock_guard<std::recursive_mutex> guard(
291  m_impl_up->GetTarget()->GetAPIMutex());
292 
293  return bp_name->GetOptions().GetIgnoreCount();
294 }
295 
296 void SBBreakpointName::SetCondition(const char *condition) {
297  LLDB_INSTRUMENT_VA(this, condition);
298 
299  BreakpointName *bp_name = GetBreakpointName();
300  if (!bp_name)
301  return;
302 
303  std::lock_guard<std::recursive_mutex> guard(
304  m_impl_up->GetTarget()->GetAPIMutex());
305 
306  bp_name->GetOptions().SetCondition(condition);
307  UpdateName(*bp_name);
308 }
309 
311  LLDB_INSTRUMENT_VA(this);
312 
313  BreakpointName *bp_name = GetBreakpointName();
314  if (!bp_name)
315  return nullptr;
316 
317  std::lock_guard<std::recursive_mutex> guard(
318  m_impl_up->GetTarget()->GetAPIMutex());
319 
320  return bp_name->GetOptions().GetConditionText();
321 }
322 
323 void SBBreakpointName::SetAutoContinue(bool auto_continue) {
324  LLDB_INSTRUMENT_VA(this, auto_continue);
325 
326  BreakpointName *bp_name = GetBreakpointName();
327  if (!bp_name)
328  return;
329 
330  std::lock_guard<std::recursive_mutex> guard(
331  m_impl_up->GetTarget()->GetAPIMutex());
332 
333  bp_name->GetOptions().SetAutoContinue(auto_continue);
334  UpdateName(*bp_name);
335 }
336 
338  LLDB_INSTRUMENT_VA(this);
339 
340  BreakpointName *bp_name = GetBreakpointName();
341  if (!bp_name)
342  return false;
343 
344  std::lock_guard<std::recursive_mutex> guard(
345  m_impl_up->GetTarget()->GetAPIMutex());
346 
347  return bp_name->GetOptions().IsAutoContinue();
348 }
349 
351  LLDB_INSTRUMENT_VA(this, tid);
352 
353  BreakpointName *bp_name = GetBreakpointName();
354  if (!bp_name)
355  return;
356 
357  std::lock_guard<std::recursive_mutex> guard(
358  m_impl_up->GetTarget()->GetAPIMutex());
359 
360  bp_name->GetOptions().SetThreadID(tid);
361  UpdateName(*bp_name);
362 }
363 
365  LLDB_INSTRUMENT_VA(this);
366 
367  BreakpointName *bp_name = GetBreakpointName();
368  if (!bp_name)
369  return LLDB_INVALID_THREAD_ID;
370 
371  std::lock_guard<std::recursive_mutex> guard(
372  m_impl_up->GetTarget()->GetAPIMutex());
373 
374  return bp_name->GetOptions().GetThreadSpec()->GetTID();
375 }
376 
378  LLDB_INSTRUMENT_VA(this, index);
379 
380  BreakpointName *bp_name = GetBreakpointName();
381  if (!bp_name)
382  return;
383 
384  std::lock_guard<std::recursive_mutex> guard(
385  m_impl_up->GetTarget()->GetAPIMutex());
386 
387  bp_name->GetOptions().GetThreadSpec()->SetIndex(index);
388  UpdateName(*bp_name);
389 }
390 
392  LLDB_INSTRUMENT_VA(this);
393 
394  BreakpointName *bp_name = GetBreakpointName();
395  if (!bp_name)
396  return LLDB_INVALID_THREAD_ID;
397 
398  std::lock_guard<std::recursive_mutex> guard(
399  m_impl_up->GetTarget()->GetAPIMutex());
400 
401  return bp_name->GetOptions().GetThreadSpec()->GetIndex();
402 }
403 
404 void SBBreakpointName::SetThreadName(const char *thread_name) {
405  LLDB_INSTRUMENT_VA(this, thread_name);
406 
407  BreakpointName *bp_name = GetBreakpointName();
408  if (!bp_name)
409  return;
410 
411  std::lock_guard<std::recursive_mutex> guard(
412  m_impl_up->GetTarget()->GetAPIMutex());
413 
414  bp_name->GetOptions().GetThreadSpec()->SetName(thread_name);
415  UpdateName(*bp_name);
416 }
417 
418 const char *SBBreakpointName::GetThreadName() const {
419  LLDB_INSTRUMENT_VA(this);
420 
421  BreakpointName *bp_name = GetBreakpointName();
422  if (!bp_name)
423  return nullptr;
424 
425  std::lock_guard<std::recursive_mutex> guard(
426  m_impl_up->GetTarget()->GetAPIMutex());
427 
428  return bp_name->GetOptions().GetThreadSpec()->GetName();
429 }
430 
431 void SBBreakpointName::SetQueueName(const char *queue_name) {
432  LLDB_INSTRUMENT_VA(this, queue_name);
433 
434  BreakpointName *bp_name = GetBreakpointName();
435  if (!bp_name)
436  return;
437 
438  std::lock_guard<std::recursive_mutex> guard(
439  m_impl_up->GetTarget()->GetAPIMutex());
440 
441  bp_name->GetOptions().GetThreadSpec()->SetQueueName(queue_name);
442  UpdateName(*bp_name);
443 }
444 
445 const char *SBBreakpointName::GetQueueName() const {
446  LLDB_INSTRUMENT_VA(this);
447 
448  BreakpointName *bp_name = GetBreakpointName();
449  if (!bp_name)
450  return nullptr;
451 
452  std::lock_guard<std::recursive_mutex> guard(
453  m_impl_up->GetTarget()->GetAPIMutex());
454 
455  return bp_name->GetOptions().GetThreadSpec()->GetQueueName();
456 }
457 
459  LLDB_INSTRUMENT_VA(this, commands);
460 
461  BreakpointName *bp_name = GetBreakpointName();
462  if (!bp_name)
463  return;
464  if (commands.GetSize() == 0)
465  return;
466 
467 
468  std::lock_guard<std::recursive_mutex> guard(
469  m_impl_up->GetTarget()->GetAPIMutex());
470  std::unique_ptr<BreakpointOptions::CommandData> cmd_data_up(
472 
473  bp_name->GetOptions().SetCommandDataCallback(cmd_data_up);
474  UpdateName(*bp_name);
475 }
476 
478  LLDB_INSTRUMENT_VA(this, commands);
479 
480  BreakpointName *bp_name = GetBreakpointName();
481  if (!bp_name)
482  return false;
483 
484  StringList command_list;
485  bool has_commands =
486  bp_name->GetOptions().GetCommandLineCallbacks(command_list);
487  if (has_commands)
488  commands.AppendList(command_list);
489  return has_commands;
490 }
491 
492 const char *SBBreakpointName::GetHelpString() const {
493  LLDB_INSTRUMENT_VA(this);
494 
495  BreakpointName *bp_name = GetBreakpointName();
496  if (!bp_name)
497  return "";
498 
499  return bp_name->GetHelp();
500 }
501 
502 void SBBreakpointName::SetHelpString(const char *help_string) {
503  LLDB_INSTRUMENT_VA(this, help_string);
504 
505  BreakpointName *bp_name = GetBreakpointName();
506  if (!bp_name)
507  return;
508 
509 
510  std::lock_guard<std::recursive_mutex> guard(
511  m_impl_up->GetTarget()->GetAPIMutex());
512  bp_name->SetHelp(help_string);
513 }
514 
516  LLDB_INSTRUMENT_VA(this, s);
517 
518  BreakpointName *bp_name = GetBreakpointName();
519  if (!bp_name)
520  {
521  s.Printf("No value");
522  return false;
523  }
524 
525  std::lock_guard<std::recursive_mutex> guard(
526  m_impl_up->GetTarget()->GetAPIMutex());
528  return true;
529 }
530 
532  void *baton) {
533  LLDB_INSTRUMENT_VA(this, callback, baton);
534 
535  BreakpointName *bp_name = GetBreakpointName();
536  if (!bp_name)
537  return;
538  std::lock_guard<std::recursive_mutex> guard(
539  m_impl_up->GetTarget()->GetAPIMutex());
540 
541  BatonSP baton_sp(new SBBreakpointCallbackBaton(callback, baton));
543  ::PrivateBreakpointHitCallback,
544  baton_sp,
545  false);
546  UpdateName(*bp_name);
547 }
548 
550  const char *callback_function_name) {
551  LLDB_INSTRUMENT_VA(this, callback_function_name);
552  SBStructuredData empty_args;
553  SetScriptCallbackFunction(callback_function_name, empty_args);
554 }
555 
557  const char *callback_function_name,
558  SBStructuredData &extra_args) {
559  LLDB_INSTRUMENT_VA(this, callback_function_name, extra_args);
560  SBError sb_error;
561  BreakpointName *bp_name = GetBreakpointName();
562  if (!bp_name) {
563  sb_error.SetErrorString("unrecognized breakpoint name");
564  return sb_error;
565  }
566 
567  std::lock_guard<std::recursive_mutex> guard(
568  m_impl_up->GetTarget()->GetAPIMutex());
569 
570  BreakpointOptions &bp_options = bp_name->GetOptions();
571  Status error;
572  error = m_impl_up->GetTarget()
573  ->GetDebugger()
574  .GetScriptInterpreter()
575  ->SetBreakpointCommandCallbackFunction(
576  bp_options, callback_function_name,
577  extra_args.m_impl_up->GetObjectSP());
578  sb_error.SetError(error);
579  UpdateName(*bp_name);
580  return sb_error;
581 }
582 
583 SBError
584 SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) {
585  LLDB_INSTRUMENT_VA(this, callback_body_text);
586 
587  SBError sb_error;
588  BreakpointName *bp_name = GetBreakpointName();
589  if (!bp_name)
590  return sb_error;
591 
592  std::lock_guard<std::recursive_mutex> guard(
593  m_impl_up->GetTarget()->GetAPIMutex());
594 
595  BreakpointOptions &bp_options = bp_name->GetOptions();
596  Status error =
597  m_impl_up->GetTarget()
598  ->GetDebugger()
599  .GetScriptInterpreter()
600  ->SetBreakpointCommandCallback(bp_options, callback_body_text);
601  sb_error.SetError(error);
602  if (!sb_error.Fail())
603  UpdateName(*bp_name);
604 
605  return sb_error;
606 }
607 
609  LLDB_INSTRUMENT_VA(this);
610 
611  BreakpointName *bp_name = GetBreakpointName();
612  if (!bp_name)
613  return false;
614  return bp_name->GetPermissions().GetAllowList();
615 }
616 
618  LLDB_INSTRUMENT_VA(this, value);
619 
620  BreakpointName *bp_name = GetBreakpointName();
621  if (!bp_name)
622  return;
623  bp_name->GetPermissions().SetAllowList(value);
624 }
625 
627  LLDB_INSTRUMENT_VA(this);
628 
629  BreakpointName *bp_name = GetBreakpointName();
630  if (!bp_name)
631  return false;
632  return bp_name->GetPermissions().GetAllowDelete();
633 }
634 
636  LLDB_INSTRUMENT_VA(this, value);
637 
638  BreakpointName *bp_name = GetBreakpointName();
639  if (!bp_name)
640  return;
641  bp_name->GetPermissions().SetAllowDelete(value);
642 }
643 
645  LLDB_INSTRUMENT_VA(this);
646 
647  BreakpointName *bp_name = GetBreakpointName();
648  if (!bp_name)
649  return false;
650  return bp_name->GetPermissions().GetAllowDisable();
651 }
652 
654  LLDB_INSTRUMENT_VA(this, value);
655 
656  BreakpointName *bp_name = GetBreakpointName();
657  if (!bp_name)
658  return;
659  bp_name->GetPermissions().SetAllowDisable(value);
660 }
661 
663 {
664  if (!IsValid())
665  return nullptr;
666  return m_impl_up->GetBreakpointName();
667 }
lldb::SBStringList
Definition: SBStringList.h:16
Instrumentation.h
lldb_private::Target::ConfigureBreakpointName
void ConfigureBreakpointName(BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions)
Definition: Target.cpp:757
BreakpointName.h
lldb_private::BreakpointOptions::GetThreadSpec
ThreadSpec * GetThreadSpec()
Returns a pointer to the ThreadSpec for this option, creating it.
Definition: BreakpointOptions.cpp:498
lldb::SBTarget::IsValid
bool IsValid() const
Definition: SBTarget.cpp:152
lldb::SBStringList::GetSize
uint32_t GetSize() const
Definition: SBStringList.cpp:96
lldb::SBBreakpointName::operator==
bool operator==(const lldb::SBBreakpointName &rhs)
Definition: SBBreakpointName.cpp:173
lldb::SBBreakpointName::GetHelpString
const char * GetHelpString() const
Definition: SBBreakpointName.cpp:492
lldb_private::BreakpointOptions::SetIgnoreCount
void SetIgnoreCount(uint32_t n)
Set the breakpoint to ignore the next count breakpoint hits.
Definition: BreakpointOptions.h:299
lldb::SBStream::Printf
void Printf(const char *format,...) __attribute__((format(printf
Definition: SBStream.cpp:70
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:445
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::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:470
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:483
SBStringList.h
lldb_private::BreakpointName::Permissions::GetAllowDelete
bool GetAllowDelete() const
Definition: BreakpointName.h:90
lldb::SBBreakpointName::SetCallback
void SetCallback(SBBreakpointHitCallback callback, void *baton)
Definition: SBBreakpointName.cpp:531
lldb_private::BreakpointOptions::SetThreadID
void SetThreadID(lldb::tid_t thread_id)
Definition: BreakpointOptions.cpp:507
lldb::SBBreakpointName::SetIgnoreCount
void SetIgnoreCount(uint32_t count)
Definition: SBBreakpointName.cpp:269
StoppointCallbackContext.h
lldb_private::BreakpointOptions::SetEnabled
void SetEnabled(bool enabled)
If enable is true, enable the breakpoint, if false disable it.
Definition: BreakpointOptions.h:269
lldb::SBBreakpointNameImpl::SBBreakpointNameImpl
SBBreakpointNameImpl(TargetSP target_sp, const char *name)
Definition: SBBreakpointName.cpp:37
lldb::SBBreakpointName::GetName
const char * GetName() const
Definition: SBBreakpointName.cpp:197
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:266
lldb::SBBreakpointName::GetAllowList
bool GetAllowList() const
Definition: SBBreakpointName.cpp:608
lldb::SBBreakpointName::GetCondition
const char * GetCondition()
Definition: SBBreakpointName.cpp:310
lldb::SBBreakpointName::~SBBreakpointName
~SBBreakpointName()
lldb::SBBreakpointName::SetAllowDelete
void SetAllowDelete(bool value)
Definition: SBBreakpointName.cpp:635
Debugger.h
lldb_private::Target
Definition: Target.h:469
lldb::SBBreakpointName::SetScriptCallbackBody
SBError SetScriptCallbackBody(const char *script_body_text)
Definition: SBBreakpointName.cpp:584
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:280
lldb::SBBreakpointNameImpl
class LLDB_API SBBreakpointNameImpl
Definition: SBDefines.h:38
lldb::eScriptLanguageNone
@ eScriptLanguageNone
Definition: lldb-enumerations.h:218
lldb::SBBreakpointName::GetCommandLineCommands
bool GetCommandLineCommands(lldb::SBStringList &commands)
Definition: SBBreakpointName.cpp:477
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:58
lldb::SBStream::get
lldb_private::Stream * get()
Definition: SBStream.cpp:174
lldb::SBBreakpointName::SetAutoContinue
void SetAutoContinue(bool auto_continue)
Definition: SBBreakpointName.cpp:323
lldb::SBBreakpointName::SetEnabled
void SetEnabled(bool enable)
Definition: SBBreakpointName.cpp:205
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:431
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:392
lldb::SBBreakpoint::IsValid
bool IsValid() const
Definition: SBBreakpoint.cpp:102
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:418
lldb::SBBreakpointName::SetThreadIndex
void SetThreadIndex(uint32_t index)
Definition: SBBreakpointName.cpp:377
lldb_private::BreakpointName::Permissions
Definition: BreakpointName.h:32
lldb::SBBreakpointName::UpdateName
void UpdateName(lldb_private::BreakpointName &bp_name)
Definition: SBBreakpointName.cpp:218
lldb_private::StringList
Definition: StringList.h:26
lldb_private::ConstString
Definition: ConstString.h:39
lldb::SBError::SetErrorString
void SetErrorString(const char *err_str)
Definition: SBError.cpp:126
lldb_private::BreakpointOptions
Definition: BreakpointOptions.h:27
lldb::eDescriptionLevelFull
@ eDescriptionLevelFull
Definition: lldb-enumerations.h:210
lldb::SBBreakpointName::SetAllowList
void SetAllowList(bool value)
Definition: SBBreakpointName.cpp:617
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:60
lldb_private::ThreadSpec::SetIndex
void SetIndex(uint32_t index)
Definition: ThreadSpec.h:45
lldb::SBBreakpointName::SetCommandLineCommands
void SetCommandLineCommands(lldb::SBStringList &commands)
Definition: SBBreakpointName.cpp:458
lldb::SBBreakpointName::operator!=
bool operator!=(const lldb::SBBreakpointName &rhs)
Definition: SBBreakpointName.cpp:179
SBDebugger.h
lldb::SBBreakpointName::IsValid
bool IsValid() const
Definition: SBBreakpointName.cpp:185
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:100
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:600
lldb::SBBreakpointName::GetAutoContinue
bool GetAutoContinue()
Definition: SBBreakpointName.cpp:337
lldb_private::operator!=
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1022
lldb_private::BreakpointName::Permissions::SetAllowList
bool SetAllowList(bool value)
Definition: BreakpointName.h:88
lldb::SBBreakpointName::IsOneShot
bool IsOneShot() const
Definition: SBBreakpointName.cpp:256
lldb::SBBreakpointName::GetIgnoreCount
uint32_t GetIgnoreCount() const
Definition: SBBreakpointName.cpp:283
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:110
lldb_private::ThreadSpec::GetIndex
uint32_t GetIndex() const
Definition: ThreadSpec.h:55
lldb::SBBreakpointName::GetAllowDisable
bool GetAllowDisable()
Definition: SBBreakpointName.cpp:644
lldb::SBBreakpointName::operator=
const lldb::SBBreakpointName & operator=(const lldb::SBBreakpointName &rhs)
Definition: SBBreakpointName.cpp:160
lldb::SBBreakpointName::GetDescription
bool GetDescription(lldb::SBStream &description)
Definition: SBBreakpointName.cpp:515
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:391
lldb_private::ThreadSpec::GetQueueName
const char * GetQueueName() const
Definition: ThreadSpec.cpp:72
lldb::SBBreakpointName::GetThreadID
lldb::tid_t GetThreadID()
Definition: SBBreakpointName.cpp:364
lldb::SBBreakpointName::SetScriptCallbackFunction
void SetScriptCallbackFunction(const char *callback_function_name)
Definition: SBBreakpointName.cpp:549
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:242
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:291
lldb::SBBreakpointName::SetThreadID
void SetThreadID(lldb::tid_t sb_thread_id)
Definition: SBBreakpointName.cpp:350
lldb_private::BreakpointName::Permissions::SetAllowDisable
bool SetAllowDisable(bool value)
Definition: BreakpointName.h:94
lldb::SBBreakpointName::SetCondition
void SetCondition(const char *condition)
Definition: SBBreakpointName.cpp:296
lldb_private::BreakpointOptions::IsOneShot
bool IsOneShot() const
Check the One-shot state.
Definition: BreakpointOptions.h:288
lldb::SBBreakpointNameImpl::GetBreakpointName
lldb_private::BreakpointName * GetBreakpointName() const
Definition: SBBreakpointName.cpp:98
SBStructuredData.h
StructuredDataImpl.h
lldb::SBBreakpointName::GetAllowDelete
bool GetAllowDelete()
Definition: SBBreakpointName.cpp:626
lldb_private::BreakpointOptions::GetIgnoreCount
uint32_t GetIgnoreCount() const
Return the current Ignore Count.
Definition: BreakpointOptions.h:307
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:785
lldb_private::BreakpointOptions::IsAutoContinue
bool IsAutoContinue() const
Check the auto-continue state.
Definition: BreakpointOptions.h:277
lldb_private::BreakpointName::GetHelp
const char * GetHelp()
Definition: BreakpointName.h:189
lldb::SBBreakpointName::GetBreakpointName
lldb_private::BreakpointName * GetBreakpointName() const
Definition: SBBreakpointName.cpp:662
lldb::SBBreakpointName::IsEnabled
bool IsEnabled()
Definition: SBBreakpointName.cpp:229
lldb::SBTarget::GetSP
lldb::TargetSP GetSP() const
Definition: SBTarget.cpp:576
LLDB_INSTRUMENT_VA
#define LLDB_INSTRUMENT_VA(...)
Definition: Instrumentation.h:98
CommandInterpreter.h
lldb::SBBreakpointName::SetAllowDisable
void SetAllowDisable(bool value)
Definition: SBBreakpointName.cpp:653
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:82
Stream.h
lldb::SBBreakpointName::SetThreadName
void SetThreadName(const char *thread_name)
Definition: SBBreakpointName.cpp:404
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:456
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:69
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::SBBreakpointName::SetHelpString
void SetHelpString(const char *help_string)
Definition: SBBreakpointName.cpp:502