[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / source / API / SBBreakpointName.cpp
blob5bd7732ebb60bc58afb865ba2a8cbc58392615ed
1 //===-- SBBreakpointName.cpp ----------------------------------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
9 #include "lldb/API/SBBreakpointName.h"
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"
15 #include "lldb/API/SBStructuredData.h"
16 #include "lldb/API/SBTarget.h"
18 #include "lldb/Breakpoint/BreakpointName.h"
19 #include "lldb/Breakpoint/StoppointCallbackContext.h"
20 #include "lldb/Core/Debugger.h"
21 #include "lldb/Core/StructuredDataImpl.h"
22 #include "lldb/Interpreter/CommandInterpreter.h"
23 #include "lldb/Interpreter/ScriptInterpreter.h"
24 #include "lldb/Target/Target.h"
25 #include "lldb/Target/ThreadSpec.h"
26 #include "lldb/Utility/Stream.h"
28 #include "SBBreakpointOptionCommon.h"
30 using namespace lldb;
31 using namespace lldb_private;
33 namespace lldb
35 class SBBreakpointNameImpl {
36 public:
37 SBBreakpointNameImpl(TargetSP target_sp, const char *name) {
38 if (!name || name[0] == '\0')
39 return;
40 m_name.assign(name);
42 if (!target_sp)
43 return;
45 m_target_wp = target_sp;
48 SBBreakpointNameImpl(SBTarget &sb_target, const char *name);
49 bool operator==(const SBBreakpointNameImpl &rhs);
50 bool operator!=(const SBBreakpointNameImpl &rhs);
52 // For now we take a simple approach and only keep the name, and relook up
53 // the location when we need it.
55 TargetSP GetTarget() const {
56 return m_target_wp.lock();
59 const char *GetName() const {
60 return m_name.c_str();
63 bool IsValid() const {
64 return !m_name.empty() && m_target_wp.lock();
67 lldb_private::BreakpointName *GetBreakpointName() const;
69 private:
70 TargetWP m_target_wp;
71 std::string m_name;
74 SBBreakpointNameImpl::SBBreakpointNameImpl(SBTarget &sb_target,
75 const char *name) {
76 if (!name || name[0] == '\0')
77 return;
78 m_name.assign(name);
80 if (!sb_target.IsValid())
81 return;
83 TargetSP target_sp = sb_target.GetSP();
84 if (!target_sp)
85 return;
87 m_target_wp = target_sp;
90 bool SBBreakpointNameImpl::operator==(const SBBreakpointNameImpl &rhs) {
91 return m_name == rhs.m_name && m_target_wp.lock() == rhs.m_target_wp.lock();
94 bool SBBreakpointNameImpl::operator!=(const SBBreakpointNameImpl &rhs) {
95 return m_name != rhs.m_name || m_target_wp.lock() != rhs.m_target_wp.lock();
98 lldb_private::BreakpointName *SBBreakpointNameImpl::GetBreakpointName() const {
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);
108 } // namespace lldb
110 SBBreakpointName::SBBreakpointName() {
111 LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpointName);
114 SBBreakpointName::SBBreakpointName(SBTarget &sb_target, const char *name) {
115 LLDB_RECORD_CONSTRUCTOR(SBBreakpointName, (lldb::SBTarget &, const char *),
116 sb_target, name);
118 m_impl_up.reset(new 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();
125 SBBreakpointName::SBBreakpointName(SBBreakpoint &sb_bkpt, const char *name) {
126 LLDB_RECORD_CONSTRUCTOR(SBBreakpointName,
127 (lldb::SBBreakpoint &, const char *), sb_bkpt, name);
129 if (!sb_bkpt.IsValid()) {
130 m_impl_up.reset();
131 return;
133 BreakpointSP bkpt_sp = sb_bkpt.GetSP();
134 Target &target = bkpt_sp->GetTarget();
136 m_impl_up.reset(new SBBreakpointNameImpl(target.shared_from_this(), name));
138 // Call FindBreakpointName here to make sure the name is valid, reset if not:
139 BreakpointName *bp_name = GetBreakpointName();
140 if (!bp_name) {
141 m_impl_up.reset();
142 return;
145 // Now copy over the breakpoint's options:
146 target.ConfigureBreakpointName(*bp_name, *bkpt_sp->GetOptions(),
147 BreakpointName::Permissions());
150 SBBreakpointName::SBBreakpointName(const SBBreakpointName &rhs) {
151 LLDB_RECORD_CONSTRUCTOR(SBBreakpointName, (const lldb::SBBreakpointName &),
152 rhs);
154 if (!rhs.m_impl_up)
155 return;
156 else
157 m_impl_up.reset(new SBBreakpointNameImpl(rhs.m_impl_up->GetTarget(),
158 rhs.m_impl_up->GetName()));
161 SBBreakpointName::~SBBreakpointName() = default;
163 const SBBreakpointName &SBBreakpointName::
164 operator=(const SBBreakpointName &rhs) {
165 LLDB_RECORD_METHOD(
166 const lldb::SBBreakpointName &,
167 SBBreakpointName, operator=,(const lldb::SBBreakpointName &), rhs);
169 if (!rhs.m_impl_up) {
170 m_impl_up.reset();
171 return LLDB_RECORD_RESULT(*this);
174 m_impl_up.reset(new SBBreakpointNameImpl(rhs.m_impl_up->GetTarget(),
175 rhs.m_impl_up->GetName()));
176 return LLDB_RECORD_RESULT(*this);
179 bool SBBreakpointName::operator==(const lldb::SBBreakpointName &rhs) {
180 LLDB_RECORD_METHOD(
181 bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &), rhs);
183 return *m_impl_up == *rhs.m_impl_up;
186 bool SBBreakpointName::operator!=(const lldb::SBBreakpointName &rhs) {
187 LLDB_RECORD_METHOD(
188 bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &), rhs);
190 return *m_impl_up != *rhs.m_impl_up;
193 bool SBBreakpointName::IsValid() const {
194 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsValid);
195 return this->operator bool();
197 SBBreakpointName::operator bool() const {
198 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, operator bool);
200 if (!m_impl_up)
201 return false;
202 return m_impl_up->IsValid();
205 const char *SBBreakpointName::GetName() const {
206 LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName, GetName);
208 if (!m_impl_up)
209 return "<Invalid Breakpoint Name Object>";
210 return m_impl_up->GetName();
213 void SBBreakpointName::SetEnabled(bool enable) {
214 LLDB_RECORD_METHOD(void, SBBreakpointName, SetEnabled, (bool), enable);
216 BreakpointName *bp_name = GetBreakpointName();
217 if (!bp_name)
218 return;
220 std::lock_guard<std::recursive_mutex> guard(
221 m_impl_up->GetTarget()->GetAPIMutex());
223 bp_name->GetOptions().SetEnabled(enable);
226 void SBBreakpointName::UpdateName(BreakpointName &bp_name) {
227 if (!IsValid())
228 return;
230 TargetSP target_sp = m_impl_up->GetTarget();
231 if (!target_sp)
232 return;
233 target_sp->ApplyNameToBreakpoints(bp_name);
237 bool SBBreakpointName::IsEnabled() {
238 LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, IsEnabled);
240 BreakpointName *bp_name = GetBreakpointName();
241 if (!bp_name)
242 return false;
244 std::lock_guard<std::recursive_mutex> guard(
245 m_impl_up->GetTarget()->GetAPIMutex());
247 return bp_name->GetOptions().IsEnabled();
250 void SBBreakpointName::SetOneShot(bool one_shot) {
251 LLDB_RECORD_METHOD(void, SBBreakpointName, SetOneShot, (bool), one_shot);
253 BreakpointName *bp_name = GetBreakpointName();
254 if (!bp_name)
255 return;
257 std::lock_guard<std::recursive_mutex> guard(
258 m_impl_up->GetTarget()->GetAPIMutex());
260 bp_name->GetOptions().SetOneShot(one_shot);
261 UpdateName(*bp_name);
264 bool SBBreakpointName::IsOneShot() const {
265 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsOneShot);
267 const BreakpointName *bp_name = GetBreakpointName();
268 if (!bp_name)
269 return false;
271 std::lock_guard<std::recursive_mutex> guard(
272 m_impl_up->GetTarget()->GetAPIMutex());
274 return bp_name->GetOptions().IsOneShot();
277 void SBBreakpointName::SetIgnoreCount(uint32_t count) {
278 LLDB_RECORD_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t), count);
280 BreakpointName *bp_name = GetBreakpointName();
281 if (!bp_name)
282 return;
284 std::lock_guard<std::recursive_mutex> guard(
285 m_impl_up->GetTarget()->GetAPIMutex());
287 bp_name->GetOptions().SetIgnoreCount(count);
288 UpdateName(*bp_name);
291 uint32_t SBBreakpointName::GetIgnoreCount() const {
292 LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointName, GetIgnoreCount);
294 BreakpointName *bp_name = GetBreakpointName();
295 if (!bp_name)
296 return false;
298 std::lock_guard<std::recursive_mutex> guard(
299 m_impl_up->GetTarget()->GetAPIMutex());
301 return bp_name->GetOptions().GetIgnoreCount();
304 void SBBreakpointName::SetCondition(const char *condition) {
305 LLDB_RECORD_METHOD(void, SBBreakpointName, SetCondition, (const char *),
306 condition);
308 BreakpointName *bp_name = GetBreakpointName();
309 if (!bp_name)
310 return;
312 std::lock_guard<std::recursive_mutex> guard(
313 m_impl_up->GetTarget()->GetAPIMutex());
315 bp_name->GetOptions().SetCondition(condition);
316 UpdateName(*bp_name);
319 const char *SBBreakpointName::GetCondition() {
320 LLDB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpointName, GetCondition);
322 BreakpointName *bp_name = GetBreakpointName();
323 if (!bp_name)
324 return nullptr;
326 std::lock_guard<std::recursive_mutex> guard(
327 m_impl_up->GetTarget()->GetAPIMutex());
329 return bp_name->GetOptions().GetConditionText();
332 void SBBreakpointName::SetAutoContinue(bool auto_continue) {
333 LLDB_RECORD_METHOD(void, SBBreakpointName, SetAutoContinue, (bool),
334 auto_continue);
336 BreakpointName *bp_name = GetBreakpointName();
337 if (!bp_name)
338 return;
340 std::lock_guard<std::recursive_mutex> guard(
341 m_impl_up->GetTarget()->GetAPIMutex());
343 bp_name->GetOptions().SetAutoContinue(auto_continue);
344 UpdateName(*bp_name);
347 bool SBBreakpointName::GetAutoContinue() {
348 LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAutoContinue);
350 BreakpointName *bp_name = GetBreakpointName();
351 if (!bp_name)
352 return false;
354 std::lock_guard<std::recursive_mutex> guard(
355 m_impl_up->GetTarget()->GetAPIMutex());
357 return bp_name->GetOptions().IsAutoContinue();
360 void SBBreakpointName::SetThreadID(tid_t tid) {
361 LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t), tid);
363 BreakpointName *bp_name = GetBreakpointName();
364 if (!bp_name)
365 return;
367 std::lock_guard<std::recursive_mutex> guard(
368 m_impl_up->GetTarget()->GetAPIMutex());
370 bp_name->GetOptions().SetThreadID(tid);
371 UpdateName(*bp_name);
374 tid_t SBBreakpointName::GetThreadID() {
375 LLDB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBBreakpointName, GetThreadID);
377 BreakpointName *bp_name = GetBreakpointName();
378 if (!bp_name)
379 return LLDB_INVALID_THREAD_ID;
381 std::lock_guard<std::recursive_mutex> guard(
382 m_impl_up->GetTarget()->GetAPIMutex());
384 return bp_name->GetOptions().GetThreadSpec()->GetTID();
387 void SBBreakpointName::SetThreadIndex(uint32_t index) {
388 LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t), index);
390 BreakpointName *bp_name = GetBreakpointName();
391 if (!bp_name)
392 return;
394 std::lock_guard<std::recursive_mutex> guard(
395 m_impl_up->GetTarget()->GetAPIMutex());
397 bp_name->GetOptions().GetThreadSpec()->SetIndex(index);
398 UpdateName(*bp_name);
401 uint32_t SBBreakpointName::GetThreadIndex() const {
402 LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointName, GetThreadIndex);
404 BreakpointName *bp_name = GetBreakpointName();
405 if (!bp_name)
406 return LLDB_INVALID_THREAD_ID;
408 std::lock_guard<std::recursive_mutex> guard(
409 m_impl_up->GetTarget()->GetAPIMutex());
411 return bp_name->GetOptions().GetThreadSpec()->GetIndex();
414 void SBBreakpointName::SetThreadName(const char *thread_name) {
415 LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadName, (const char *),
416 thread_name);
418 BreakpointName *bp_name = GetBreakpointName();
419 if (!bp_name)
420 return;
422 std::lock_guard<std::recursive_mutex> guard(
423 m_impl_up->GetTarget()->GetAPIMutex());
425 bp_name->GetOptions().GetThreadSpec()->SetName(thread_name);
426 UpdateName(*bp_name);
429 const char *SBBreakpointName::GetThreadName() const {
430 LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName,
431 GetThreadName);
433 BreakpointName *bp_name = GetBreakpointName();
434 if (!bp_name)
435 return nullptr;
437 std::lock_guard<std::recursive_mutex> guard(
438 m_impl_up->GetTarget()->GetAPIMutex());
440 return bp_name->GetOptions().GetThreadSpec()->GetName();
443 void SBBreakpointName::SetQueueName(const char *queue_name) {
444 LLDB_RECORD_METHOD(void, SBBreakpointName, SetQueueName, (const char *),
445 queue_name);
447 BreakpointName *bp_name = GetBreakpointName();
448 if (!bp_name)
449 return;
451 std::lock_guard<std::recursive_mutex> guard(
452 m_impl_up->GetTarget()->GetAPIMutex());
454 bp_name->GetOptions().GetThreadSpec()->SetQueueName(queue_name);
455 UpdateName(*bp_name);
458 const char *SBBreakpointName::GetQueueName() const {
459 LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName,
460 GetQueueName);
462 BreakpointName *bp_name = GetBreakpointName();
463 if (!bp_name)
464 return nullptr;
466 std::lock_guard<std::recursive_mutex> guard(
467 m_impl_up->GetTarget()->GetAPIMutex());
469 return bp_name->GetOptions().GetThreadSpec()->GetQueueName();
472 void SBBreakpointName::SetCommandLineCommands(SBStringList &commands) {
473 LLDB_RECORD_METHOD(void, SBBreakpointName, SetCommandLineCommands,
474 (lldb::SBStringList &), commands);
476 BreakpointName *bp_name = GetBreakpointName();
477 if (!bp_name)
478 return;
479 if (commands.GetSize() == 0)
480 return;
483 std::lock_guard<std::recursive_mutex> guard(
484 m_impl_up->GetTarget()->GetAPIMutex());
485 std::unique_ptr<BreakpointOptions::CommandData> cmd_data_up(
486 new BreakpointOptions::CommandData(*commands, eScriptLanguageNone));
488 bp_name->GetOptions().SetCommandDataCallback(cmd_data_up);
489 UpdateName(*bp_name);
492 bool SBBreakpointName::GetCommandLineCommands(SBStringList &commands) {
493 LLDB_RECORD_METHOD(bool, SBBreakpointName, GetCommandLineCommands,
494 (lldb::SBStringList &), commands);
496 BreakpointName *bp_name = GetBreakpointName();
497 if (!bp_name)
498 return false;
500 StringList command_list;
501 bool has_commands =
502 bp_name->GetOptions().GetCommandLineCallbacks(command_list);
503 if (has_commands)
504 commands.AppendList(command_list);
505 return has_commands;
508 const char *SBBreakpointName::GetHelpString() const {
509 LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName,
510 GetHelpString);
512 BreakpointName *bp_name = GetBreakpointName();
513 if (!bp_name)
514 return "";
516 return bp_name->GetHelp();
519 void SBBreakpointName::SetHelpString(const char *help_string) {
520 LLDB_RECORD_METHOD(void, SBBreakpointName, SetHelpString, (const char *),
521 help_string);
523 BreakpointName *bp_name = GetBreakpointName();
524 if (!bp_name)
525 return;
528 std::lock_guard<std::recursive_mutex> guard(
529 m_impl_up->GetTarget()->GetAPIMutex());
530 bp_name->SetHelp(help_string);
533 bool SBBreakpointName::GetDescription(SBStream &s) {
534 LLDB_RECORD_METHOD(bool, SBBreakpointName, GetDescription, (lldb::SBStream &),
537 BreakpointName *bp_name = GetBreakpointName();
538 if (!bp_name)
540 s.Printf("No value");
541 return false;
544 std::lock_guard<std::recursive_mutex> guard(
545 m_impl_up->GetTarget()->GetAPIMutex());
546 bp_name->GetDescription(s.get(), eDescriptionLevelFull);
547 return true;
550 void SBBreakpointName::SetCallback(SBBreakpointHitCallback callback,
551 void *baton) {
552 LLDB_RECORD_DUMMY(void, SBBreakpointName, SetCallback,
553 (lldb::SBBreakpointHitCallback, void *), callback, baton);
555 BreakpointName *bp_name = GetBreakpointName();
556 if (!bp_name)
557 return;
558 std::lock_guard<std::recursive_mutex> guard(
559 m_impl_up->GetTarget()->GetAPIMutex());
561 BatonSP baton_sp(new SBBreakpointCallbackBaton(callback, baton));
562 bp_name->GetOptions().SetCallback(SBBreakpointCallbackBaton
563 ::PrivateBreakpointHitCallback,
564 baton_sp,
565 false);
566 UpdateName(*bp_name);
569 void SBBreakpointName::SetScriptCallbackFunction(
570 const char *callback_function_name) {
571 LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
572 (const char *), callback_function_name);
573 SBStructuredData empty_args;
574 SetScriptCallbackFunction(callback_function_name, empty_args);
577 SBError SBBreakpointName::SetScriptCallbackFunction(
578 const char *callback_function_name,
579 SBStructuredData &extra_args) {
580 LLDB_RECORD_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction,
581 (const char *, SBStructuredData &),
582 callback_function_name, extra_args);
583 SBError sb_error;
584 BreakpointName *bp_name = GetBreakpointName();
585 if (!bp_name) {
586 sb_error.SetErrorString("unrecognized breakpoint name");
587 return LLDB_RECORD_RESULT(sb_error);
590 std::lock_guard<std::recursive_mutex> guard(
591 m_impl_up->GetTarget()->GetAPIMutex());
593 BreakpointOptions &bp_options = bp_name->GetOptions();
594 Status error;
595 error = m_impl_up->GetTarget()
596 ->GetDebugger()
597 .GetScriptInterpreter()
598 ->SetBreakpointCommandCallbackFunction(&bp_options,
599 callback_function_name,
600 extra_args.m_impl_up
601 ->GetObjectSP());
602 sb_error.SetError(error);
603 UpdateName(*bp_name);
604 return LLDB_RECORD_RESULT(sb_error);
607 SBError
608 SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) {
609 LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody,
610 (const char *), callback_body_text);
612 SBError sb_error;
613 BreakpointName *bp_name = GetBreakpointName();
614 if (!bp_name)
615 return LLDB_RECORD_RESULT(sb_error);
617 std::lock_guard<std::recursive_mutex> guard(
618 m_impl_up->GetTarget()->GetAPIMutex());
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);
630 return LLDB_RECORD_RESULT(sb_error);
633 bool SBBreakpointName::GetAllowList() const {
634 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, GetAllowList);
636 BreakpointName *bp_name = GetBreakpointName();
637 if (!bp_name)
638 return false;
639 return bp_name->GetPermissions().GetAllowList();
642 void SBBreakpointName::SetAllowList(bool value) {
643 LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowList, (bool), value);
646 BreakpointName *bp_name = GetBreakpointName();
647 if (!bp_name)
648 return;
649 bp_name->GetPermissions().SetAllowList(value);
652 bool SBBreakpointName::GetAllowDelete() {
653 LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDelete);
655 BreakpointName *bp_name = GetBreakpointName();
656 if (!bp_name)
657 return false;
658 return bp_name->GetPermissions().GetAllowDelete();
661 void SBBreakpointName::SetAllowDelete(bool value) {
662 LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDelete, (bool), value);
665 BreakpointName *bp_name = GetBreakpointName();
666 if (!bp_name)
667 return;
668 bp_name->GetPermissions().SetAllowDelete(value);
671 bool SBBreakpointName::GetAllowDisable() {
672 LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAllowDisable);
674 BreakpointName *bp_name = GetBreakpointName();
675 if (!bp_name)
676 return false;
677 return bp_name->GetPermissions().GetAllowDisable();
680 void SBBreakpointName::SetAllowDisable(bool value) {
681 LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDisable, (bool), value);
683 BreakpointName *bp_name = GetBreakpointName();
684 if (!bp_name)
685 return;
686 bp_name->GetPermissions().SetAllowDisable(value);
689 lldb_private::BreakpointName *SBBreakpointName::GetBreakpointName() const
691 if (!IsValid())
692 return nullptr;
693 return m_impl_up->GetBreakpointName();
697 namespace lldb_private {
698 namespace repro {
700 template <>
701 void RegisterMethods<SBBreakpointName>(Registry &R) {
702 LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName, ());
703 LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName,
704 (lldb::SBTarget &, const char *));
705 LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName,
706 (lldb::SBBreakpoint &, const char *));
707 LLDB_REGISTER_CONSTRUCTOR(SBBreakpointName,
708 (const lldb::SBBreakpointName &));
709 LLDB_REGISTER_METHOD(
710 const lldb::SBBreakpointName &,
711 SBBreakpointName, operator=,(const lldb::SBBreakpointName &));
712 LLDB_REGISTER_METHOD(
713 bool, SBBreakpointName, operator==,(const lldb::SBBreakpointName &));
714 LLDB_REGISTER_METHOD(
715 bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &));
716 LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsValid, ());
717 LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, operator bool, ());
718 LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetName, ());
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));
724 LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetIgnoreCount, ());
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));
730 LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpointName, GetThreadID, ());
731 LLDB_REGISTER_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t));
732 LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointName, GetThreadIndex, ());
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));