1 //===-- SBBreakpoint.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 "lldb/API/SBBreakpoint.h"
10 #include "SBReproducerPrivate.h"
11 #include "lldb/API/SBBreakpointLocation.h"
12 #include "lldb/API/SBDebugger.h"
13 #include "lldb/API/SBEvent.h"
14 #include "lldb/API/SBProcess.h"
15 #include "lldb/API/SBStream.h"
16 #include "lldb/API/SBStringList.h"
17 #include "lldb/API/SBStructuredData.h"
18 #include "lldb/API/SBThread.h"
19 
20 #include "lldb/Breakpoint/Breakpoint.h"
21 #include "lldb/Breakpoint/BreakpointIDList.h"
22 #include "lldb/Breakpoint/BreakpointLocation.h"
23 #include "lldb/Breakpoint/BreakpointResolver.h"
24 #include "lldb/Breakpoint/BreakpointResolverScripted.h"
25 #include "lldb/Breakpoint/StoppointCallbackContext.h"
26 #include "lldb/Core/Address.h"
27 #include "lldb/Core/Debugger.h"
28 #include "lldb/Core/StreamFile.h"
29 #include "lldb/Core/StructuredDataImpl.h"
30 #include "lldb/Interpreter/CommandInterpreter.h"
31 #include "lldb/Interpreter/ScriptInterpreter.h"
32 #include "lldb/Target/Process.h"
33 #include "lldb/Target/SectionLoadList.h"
34 #include "lldb/Target/Target.h"
35 #include "lldb/Target/Thread.h"
36 #include "lldb/Target/ThreadSpec.h"
37 #include "lldb/Utility/Stream.h"
38 
39 #include "SBBreakpointOptionCommon.h"
40 
41 #include "lldb/lldb-enumerations.h"
42 
43 #include "llvm/ADT/STLExtras.h"
44 
45 using namespace lldb;
46 using namespace lldb_private;
47 
48 SBBreakpoint::SBBreakpoint() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpoint); }
49 
50 SBBreakpoint::SBBreakpoint(const SBBreakpoint &rhs)
51     : m_opaque_wp(rhs.m_opaque_wp) {
52   LLDB_RECORD_CONSTRUCTOR(SBBreakpoint, (const lldb::SBBreakpoint &), rhs);
53 }
54 
55 SBBreakpoint::SBBreakpoint(const lldb::BreakpointSP &bp_sp)
56     : m_opaque_wp(bp_sp) {
57   LLDB_RECORD_CONSTRUCTOR(SBBreakpoint, (const lldb::BreakpointSP &), bp_sp);
58 }
59 
60 SBBreakpoint::~SBBreakpoint() = default;
61 
62 const SBBreakpoint &SBBreakpoint::operator=(const SBBreakpoint &rhs) {
63   LLDB_RECORD_METHOD(const lldb::SBBreakpoint &,
64                      SBBreakpoint, operator=,(const lldb::SBBreakpoint &), rhs);
65 
66   m_opaque_wp = rhs.m_opaque_wp;
67   return LLDB_RECORD_RESULT(*this);
68 }
69 
70 bool SBBreakpoint::operator==(const lldb::SBBreakpoint &rhs) {
71   LLDB_RECORD_METHOD(
72       bool, SBBreakpoint, operator==,(const lldb::SBBreakpoint &), rhs);
73 
74   return m_opaque_wp.lock() == rhs.m_opaque_wp.lock();
75 }
76 
77 bool SBBreakpoint::operator!=(const lldb::SBBreakpoint &rhs) {
78   LLDB_RECORD_METHOD(
79       bool, SBBreakpoint, operator!=,(const lldb::SBBreakpoint &), rhs);
80 
81   return m_opaque_wp.lock() != rhs.m_opaque_wp.lock();
82 }
83 
84 break_id_t SBBreakpoint::GetID() const {
85   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::break_id_t, SBBreakpoint, GetID);
86 
87   break_id_t break_id = LLDB_INVALID_BREAK_ID;
88   BreakpointSP bkpt_sp = GetSP();
89   if (bkpt_sp)
90     break_id = bkpt_sp->GetID();
91 
92   return break_id;
93 }
94 
95 bool SBBreakpoint::IsValid() const {
96   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsValid);
97   return this->operator bool();
98 }
99 SBBreakpoint::operator bool() const {
100   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, operator bool);
101 
102   BreakpointSP bkpt_sp = GetSP();
103   if (!bkpt_sp)
104     return false;
105   else if (bkpt_sp->GetTarget().GetBreakpointByID(bkpt_sp->GetID()))
106     return true;
107   else
108     return false;
109 }
110 
111 void SBBreakpoint::ClearAllBreakpointSites() {
112   LLDB_RECORD_METHOD_NO_ARGS(void, SBBreakpoint, ClearAllBreakpointSites);
113 
114   BreakpointSP bkpt_sp = GetSP();
115   if (bkpt_sp) {
116     std::lock_guard<std::recursive_mutex> guard(
117         bkpt_sp->GetTarget().GetAPIMutex());
118     bkpt_sp->ClearAllBreakpointSites();
119   }
120 }
121 
122 SBBreakpointLocation SBBreakpoint::FindLocationByAddress(addr_t vm_addr) {
123   LLDB_RECORD_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
124                      FindLocationByAddress, (lldb::addr_t), vm_addr);
125 
126   SBBreakpointLocation sb_bp_location;
127 
128   BreakpointSP bkpt_sp = GetSP();
129   if (bkpt_sp) {
130     if (vm_addr != LLDB_INVALID_ADDRESS) {
131       std::lock_guard<std::recursive_mutex> guard(
132           bkpt_sp->GetTarget().GetAPIMutex());
133       Address address;
134       Target &target = bkpt_sp->GetTarget();
135       if (!target.GetSectionLoadList().ResolveLoadAddress(vm_addr, address)) {
136         address.SetRawAddress(vm_addr);
137       }
138       sb_bp_location.SetLocation(bkpt_sp->FindLocationByAddress(address));
139     }
140   }
141   return LLDB_RECORD_RESULT(sb_bp_location);
142 }
143 
144 break_id_t SBBreakpoint::FindLocationIDByAddress(addr_t vm_addr) {
145   LLDB_RECORD_METHOD(lldb::break_id_t, SBBreakpoint, FindLocationIDByAddress,
146                      (lldb::addr_t), vm_addr);
147 
148   break_id_t break_id = LLDB_INVALID_BREAK_ID;
149   BreakpointSP bkpt_sp = GetSP();
150 
151   if (bkpt_sp && vm_addr != LLDB_INVALID_ADDRESS) {
152     std::lock_guard<std::recursive_mutex> guard(
153         bkpt_sp->GetTarget().GetAPIMutex());
154     Address address;
155     Target &target = bkpt_sp->GetTarget();
156     if (!target.GetSectionLoadList().ResolveLoadAddress(vm_addr, address)) {
157       address.SetRawAddress(vm_addr);
158     }
159     break_id = bkpt_sp->FindLocationIDByAddress(address);
160   }
161 
162   return break_id;
163 }
164 
165 SBBreakpointLocation SBBreakpoint::FindLocationByID(break_id_t bp_loc_id) {
166   LLDB_RECORD_METHOD(lldb::SBBreakpointLocation, SBBreakpoint, FindLocationByID,
167                      (lldb::break_id_t), bp_loc_id);
168 
169   SBBreakpointLocation sb_bp_location;
170   BreakpointSP bkpt_sp = GetSP();
171 
172   if (bkpt_sp) {
173     std::lock_guard<std::recursive_mutex> guard(
174         bkpt_sp->GetTarget().GetAPIMutex());
175     sb_bp_location.SetLocation(bkpt_sp->FindLocationByID(bp_loc_id));
176   }
177 
178   return LLDB_RECORD_RESULT(sb_bp_location);
179 }
180 
181 SBBreakpointLocation SBBreakpoint::GetLocationAtIndex(uint32_t index) {
182   LLDB_RECORD_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
183                      GetLocationAtIndex, (uint32_t), index);
184 
185   SBBreakpointLocation sb_bp_location;
186   BreakpointSP bkpt_sp = GetSP();
187 
188   if (bkpt_sp) {
189     std::lock_guard<std::recursive_mutex> guard(
190         bkpt_sp->GetTarget().GetAPIMutex());
191     sb_bp_location.SetLocation(bkpt_sp->GetLocationAtIndex(index));
192   }
193 
194   return LLDB_RECORD_RESULT(sb_bp_location);
195 }
196 
197 void SBBreakpoint::SetEnabled(bool enable) {
198   LLDB_RECORD_METHOD(void, SBBreakpoint, SetEnabled, (bool), enable);
199 
200   BreakpointSP bkpt_sp = GetSP();
201 
202   if (bkpt_sp) {
203     std::lock_guard<std::recursive_mutex> guard(
204         bkpt_sp->GetTarget().GetAPIMutex());
205     bkpt_sp->SetEnabled(enable);
206   }
207 }
208 
209 bool SBBreakpoint::IsEnabled() {
210   LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpoint, IsEnabled);
211 
212   BreakpointSP bkpt_sp = GetSP();
213   if (bkpt_sp) {
214     std::lock_guard<std::recursive_mutex> guard(
215         bkpt_sp->GetTarget().GetAPIMutex());
216     return bkpt_sp->IsEnabled();
217   } else
218     return false;
219 }
220 
221 void SBBreakpoint::SetOneShot(bool one_shot) {
222   LLDB_RECORD_METHOD(void, SBBreakpoint, SetOneShot, (bool), one_shot);
223 
224   BreakpointSP bkpt_sp = GetSP();
225 
226   if (bkpt_sp) {
227     std::lock_guard<std::recursive_mutex> guard(
228         bkpt_sp->GetTarget().GetAPIMutex());
229     bkpt_sp->SetOneShot(one_shot);
230   }
231 }
232 
233 bool SBBreakpoint::IsOneShot() const {
234   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsOneShot);
235 
236   BreakpointSP bkpt_sp = GetSP();
237   if (bkpt_sp) {
238     std::lock_guard<std::recursive_mutex> guard(
239         bkpt_sp->GetTarget().GetAPIMutex());
240     return bkpt_sp->IsOneShot();
241   } else
242     return false;
243 }
244 
245 bool SBBreakpoint::IsInternal() {
246   LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpoint, IsInternal);
247 
248   BreakpointSP bkpt_sp = GetSP();
249   if (bkpt_sp) {
250     std::lock_guard<std::recursive_mutex> guard(
251         bkpt_sp->GetTarget().GetAPIMutex());
252     return bkpt_sp->IsInternal();
253   } else
254     return false;
255 }
256 
257 void SBBreakpoint::SetIgnoreCount(uint32_t count) {
258   LLDB_RECORD_METHOD(void, SBBreakpoint, SetIgnoreCount, (uint32_t), count);
259 
260   BreakpointSP bkpt_sp = GetSP();
261 
262   if (bkpt_sp) {
263     std::lock_guard<std::recursive_mutex> guard(
264         bkpt_sp->GetTarget().GetAPIMutex());
265     bkpt_sp->SetIgnoreCount(count);
266   }
267 }
268 
269 void SBBreakpoint::SetCondition(const char *condition) {
270   LLDB_RECORD_METHOD(void, SBBreakpoint, SetCondition, (const char *),
271                      condition);
272 
273   BreakpointSP bkpt_sp = GetSP();
274   if (bkpt_sp) {
275     std::lock_guard<std::recursive_mutex> guard(
276         bkpt_sp->GetTarget().GetAPIMutex());
277     bkpt_sp->SetCondition(condition);
278   }
279 }
280 
281 const char *SBBreakpoint::GetCondition() {
282   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpoint, GetCondition);
283 
284   BreakpointSP bkpt_sp = GetSP();
285   if (bkpt_sp) {
286     std::lock_guard<std::recursive_mutex> guard(
287         bkpt_sp->GetTarget().GetAPIMutex());
288     return bkpt_sp->GetConditionText();
289   }
290   return nullptr;
291 }
292 
293 void SBBreakpoint::SetAutoContinue(bool auto_continue) {
294   LLDB_RECORD_METHOD(void, SBBreakpoint, SetAutoContinue, (bool),
295                      auto_continue);
296 
297   BreakpointSP bkpt_sp = GetSP();
298   if (bkpt_sp) {
299     std::lock_guard<std::recursive_mutex> guard(
300         bkpt_sp->GetTarget().GetAPIMutex());
301     bkpt_sp->SetAutoContinue(auto_continue);
302   }
303 }
304 
305 bool SBBreakpoint::GetAutoContinue() {
306   LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpoint, GetAutoContinue);
307 
308   BreakpointSP bkpt_sp = GetSP();
309   if (bkpt_sp) {
310     std::lock_guard<std::recursive_mutex> guard(
311         bkpt_sp->GetTarget().GetAPIMutex());
312     return bkpt_sp->IsAutoContinue();
313   }
314   return false;
315 }
316 
317 uint32_t SBBreakpoint::GetHitCount() const {
318   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpoint, GetHitCount);
319 
320   uint32_t count = 0;
321   BreakpointSP bkpt_sp = GetSP();
322   if (bkpt_sp) {
323     std::lock_guard<std::recursive_mutex> guard(
324         bkpt_sp->GetTarget().GetAPIMutex());
325     count = bkpt_sp->GetHitCount();
326   }
327 
328   return count;
329 }
330 
331 uint32_t SBBreakpoint::GetIgnoreCount() const {
332   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpoint, GetIgnoreCount);
333 
334   uint32_t count = 0;
335   BreakpointSP bkpt_sp = GetSP();
336   if (bkpt_sp) {
337     std::lock_guard<std::recursive_mutex> guard(
338         bkpt_sp->GetTarget().GetAPIMutex());
339     count = bkpt_sp->GetIgnoreCount();
340   }
341 
342   return count;
343 }
344 
345 void SBBreakpoint::SetThreadID(tid_t tid) {
346   LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadID, (lldb::tid_t), tid);
347 
348   BreakpointSP bkpt_sp = GetSP();
349   if (bkpt_sp) {
350     std::lock_guard<std::recursive_mutex> guard(
351         bkpt_sp->GetTarget().GetAPIMutex());
352     bkpt_sp->SetThreadID(tid);
353   }
354 }
355 
356 tid_t SBBreakpoint::GetThreadID() {
357   LLDB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBBreakpoint, GetThreadID);
358 
359   tid_t tid = LLDB_INVALID_THREAD_ID;
360   BreakpointSP bkpt_sp = GetSP();
361   if (bkpt_sp) {
362     std::lock_guard<std::recursive_mutex> guard(
363         bkpt_sp->GetTarget().GetAPIMutex());
364     tid = bkpt_sp->GetThreadID();
365   }
366 
367   return tid;
368 }
369 
370 void SBBreakpoint::SetThreadIndex(uint32_t index) {
371   LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadIndex, (uint32_t), index);
372 
373   BreakpointSP bkpt_sp = GetSP();
374   if (bkpt_sp) {
375     std::lock_guard<std::recursive_mutex> guard(
376         bkpt_sp->GetTarget().GetAPIMutex());
377     bkpt_sp->GetOptions()->GetThreadSpec()->SetIndex(index);
378   }
379 }
380 
381 uint32_t SBBreakpoint::GetThreadIndex() const {
382   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpoint, GetThreadIndex);
383 
384   uint32_t thread_idx = UINT32_MAX;
385   BreakpointSP bkpt_sp = GetSP();
386   if (bkpt_sp) {
387     std::lock_guard<std::recursive_mutex> guard(
388         bkpt_sp->GetTarget().GetAPIMutex());
389     const ThreadSpec *thread_spec =
390         bkpt_sp->GetOptions()->GetThreadSpecNoCreate();
391     if (thread_spec != nullptr)
392       thread_idx = thread_spec->GetIndex();
393   }
394 
395   return thread_idx;
396 }
397 
398 void SBBreakpoint::SetThreadName(const char *thread_name) {
399   LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadName, (const char *),
400                      thread_name);
401 
402   BreakpointSP bkpt_sp = GetSP();
403 
404   if (bkpt_sp) {
405     std::lock_guard<std::recursive_mutex> guard(
406         bkpt_sp->GetTarget().GetAPIMutex());
407     bkpt_sp->GetOptions()->GetThreadSpec()->SetName(thread_name);
408   }
409 }
410 
411 const char *SBBreakpoint::GetThreadName() const {
412   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpoint, GetThreadName);
413 
414   const char *name = nullptr;
415   BreakpointSP bkpt_sp = GetSP();
416   if (bkpt_sp) {
417     std::lock_guard<std::recursive_mutex> guard(
418         bkpt_sp->GetTarget().GetAPIMutex());
419     const ThreadSpec *thread_spec =
420         bkpt_sp->GetOptions()->GetThreadSpecNoCreate();
421     if (thread_spec != nullptr)
422       name = thread_spec->GetName();
423   }
424 
425   return name;
426 }
427 
428 void SBBreakpoint::SetQueueName(const char *queue_name) {
429   LLDB_RECORD_METHOD(void, SBBreakpoint, SetQueueName, (const char *),
430                      queue_name);
431 
432   BreakpointSP bkpt_sp = GetSP();
433   if (bkpt_sp) {
434     std::lock_guard<std::recursive_mutex> guard(
435         bkpt_sp->GetTarget().GetAPIMutex());
436     bkpt_sp->GetOptions()->GetThreadSpec()->SetQueueName(queue_name);
437   }
438 }
439 
440 const char *SBBreakpoint::GetQueueName() const {
441   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpoint, GetQueueName);
442 
443   const char *name = nullptr;
444   BreakpointSP bkpt_sp = GetSP();
445   if (bkpt_sp) {
446     std::lock_guard<std::recursive_mutex> guard(
447         bkpt_sp->GetTarget().GetAPIMutex());
448     const ThreadSpec *thread_spec =
449         bkpt_sp->GetOptions()->GetThreadSpecNoCreate();
450     if (thread_spec)
451       name = thread_spec->GetQueueName();
452   }
453 
454   return name;
455 }
456 
457 size_t SBBreakpoint::GetNumResolvedLocations() const {
458   LLDB_RECORD_METHOD_CONST_NO_ARGS(size_t, SBBreakpoint,
459                                    GetNumResolvedLocations);
460 
461   size_t num_resolved = 0;
462   BreakpointSP bkpt_sp = GetSP();
463   if (bkpt_sp) {
464     std::lock_guard<std::recursive_mutex> guard(
465         bkpt_sp->GetTarget().GetAPIMutex());
466     num_resolved = bkpt_sp->GetNumResolvedLocations();
467   }
468   return num_resolved;
469 }
470 
471 size_t SBBreakpoint::GetNumLocations() const {
472   LLDB_RECORD_METHOD_CONST_NO_ARGS(size_t, SBBreakpoint, GetNumLocations);
473 
474   BreakpointSP bkpt_sp = GetSP();
475   size_t num_locs = 0;
476   if (bkpt_sp) {
477     std::lock_guard<std::recursive_mutex> guard(
478         bkpt_sp->GetTarget().GetAPIMutex());
479     num_locs = bkpt_sp->GetNumLocations();
480   }
481   return num_locs;
482 }
483 
484 void SBBreakpoint::SetCommandLineCommands(SBStringList &commands) {
485   LLDB_RECORD_METHOD(void, SBBreakpoint, SetCommandLineCommands,
486                      (lldb::SBStringList &), commands);
487 
488   BreakpointSP bkpt_sp = GetSP();
489   if (!bkpt_sp)
490     return;
491   if (commands.GetSize() == 0)
492     return;
493 
494   std::lock_guard<std::recursive_mutex> guard(
495       bkpt_sp->GetTarget().GetAPIMutex());
496   std::unique_ptr<BreakpointOptions::CommandData> cmd_data_up(
497       new BreakpointOptions::CommandData(*commands, eScriptLanguageNone));
498 
499   bkpt_sp->GetOptions()->SetCommandDataCallback(cmd_data_up);
500 }
501 
502 bool SBBreakpoint::GetCommandLineCommands(SBStringList &commands) {
503   LLDB_RECORD_METHOD(bool, SBBreakpoint, GetCommandLineCommands,
504                      (lldb::SBStringList &), commands);
505 
506   BreakpointSP bkpt_sp = GetSP();
507   if (!bkpt_sp)
508     return false;
509   StringList command_list;
510   bool has_commands =
511       bkpt_sp->GetOptions()->GetCommandLineCallbacks(command_list);
512   if (has_commands)
513     commands.AppendList(command_list);
514   return has_commands;
515 }
516 
517 bool SBBreakpoint::GetDescription(SBStream &s) {
518   LLDB_RECORD_METHOD(bool, SBBreakpoint, GetDescription, (lldb::SBStream &), s);
519 
520   return GetDescription(s, true);
521 }
522 
523 bool SBBreakpoint::GetDescription(SBStream &s, bool include_locations) {
524   LLDB_RECORD_METHOD(bool, SBBreakpoint, GetDescription,
525                      (lldb::SBStream &, bool), s, include_locations);
526 
527   BreakpointSP bkpt_sp = GetSP();
528   if (bkpt_sp) {
529     std::lock_guard<std::recursive_mutex> guard(
530         bkpt_sp->GetTarget().GetAPIMutex());
531     s.Printf("SBBreakpoint: id = %i, ", bkpt_sp->GetID());
532     bkpt_sp->GetResolverDescription(s.get());
533     bkpt_sp->GetFilterDescription(s.get());
534     if (include_locations) {
535       const size_t num_locations = bkpt_sp->GetNumLocations();
536       s.Printf(", locations = %" PRIu64, (uint64_t)num_locations);
537     }
538     return true;
539   }
540   s.Printf("No value");
541   return false;
542 }
543 
544 SBError SBBreakpoint::AddLocation(SBAddress &address) {
545   LLDB_RECORD_METHOD(lldb::SBError, SBBreakpoint, AddLocation,
546                      (lldb::SBAddress &), address);
547 
548   BreakpointSP bkpt_sp = GetSP();
549   SBError error;
550 
551   if (!address.IsValid()) {
552     error.SetErrorString("Can't add an invalid address.");
553     return LLDB_RECORD_RESULT(error);
554   }
555 
556   if (!bkpt_sp) {
557     error.SetErrorString("No breakpoint to add a location to.");
558     return LLDB_RECORD_RESULT(error);
559   }
560 
561   if (!llvm::isa<BreakpointResolverScripted>(bkpt_sp->GetResolver().get())) {
562     error.SetErrorString("Only a scripted resolver can add locations.");
563     return LLDB_RECORD_RESULT(error);
564   }
565 
566   if (bkpt_sp->GetSearchFilter()->AddressPasses(address.ref()))
567     bkpt_sp->AddLocation(address.ref());
568   else {
569     StreamString s;
570     address.get()->Dump(&s, &bkpt_sp->GetTarget(),
571                         Address::DumpStyleModuleWithFileAddress);
572     error.SetErrorStringWithFormat("Address: %s didn't pass the filter.",
573                                    s.GetData());
574   }
575   return LLDB_RECORD_RESULT(error);
576 }
577 
578 SBStructuredData SBBreakpoint::SerializeToStructuredData() {
579   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBStructuredData, SBBreakpoint,
580                              SerializeToStructuredData);
581 
582   SBStructuredData data;
583   BreakpointSP bkpt_sp = GetSP();
584 
585   if (!bkpt_sp)
586     return LLDB_RECORD_RESULT(data);
587 
588   StructuredData::ObjectSP bkpt_dict = bkpt_sp->SerializeToStructuredData();
589   data.m_impl_up->SetObjectSP(bkpt_dict);
590   return LLDB_RECORD_RESULT(data);
591 }
592 
593 void SBBreakpoint::SetCallback(SBBreakpointHitCallback callback, void *baton) {
594   LLDB_RECORD_DUMMY(void, SBBreakpoint, SetCallback,
595                     (lldb::SBBreakpointHitCallback, void *), callback, baton);
596 
597   BreakpointSP bkpt_sp = GetSP();
598 
599   if (bkpt_sp) {
600     std::lock_guard<std::recursive_mutex> guard(
601         bkpt_sp->GetTarget().GetAPIMutex());
602     BatonSP baton_sp(new SBBreakpointCallbackBaton(callback, baton));
603     bkpt_sp->SetCallback(SBBreakpointCallbackBaton
604       ::PrivateBreakpointHitCallback, baton_sp,
605                          false);
606   }
607 }
608 
609 void SBBreakpoint::SetScriptCallbackFunction(
610   const char *callback_function_name) {
611 LLDB_RECORD_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
612                    (const char *), callback_function_name);
613   SBStructuredData empty_args;
614   SetScriptCallbackFunction(callback_function_name, empty_args);
615 }
616 
617 SBError SBBreakpoint::SetScriptCallbackFunction(
618     const char *callback_function_name,
619     SBStructuredData &extra_args) {
620   LLDB_RECORD_METHOD(SBError, SBBreakpoint, SetScriptCallbackFunction,
621   (const char *, SBStructuredData &), callback_function_name, extra_args);
622   SBError sb_error;
623   BreakpointSP bkpt_sp = GetSP();
624 
625   if (bkpt_sp) {
626     Status error;
627     std::lock_guard<std::recursive_mutex> guard(
628         bkpt_sp->GetTarget().GetAPIMutex());
629     BreakpointOptions *bp_options = bkpt_sp->GetOptions();
630     error = bkpt_sp->GetTarget()
631         .GetDebugger()
632         .GetScriptInterpreter()
633         ->SetBreakpointCommandCallbackFunction(bp_options,
634                                                callback_function_name,
635                                                extra_args.m_impl_up
636                                                    ->GetObjectSP());
637     sb_error.SetError(error);
638   } else
639     sb_error.SetErrorString("invalid breakpoint");
640 
641   return LLDB_RECORD_RESULT(sb_error);
642 }
643 
644 SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) {
645   LLDB_RECORD_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody,
646                      (const char *), callback_body_text);
647 
648   BreakpointSP bkpt_sp = GetSP();
649 
650   SBError sb_error;
651   if (bkpt_sp) {
652     std::lock_guard<std::recursive_mutex> guard(
653         bkpt_sp->GetTarget().GetAPIMutex());
654     BreakpointOptions *bp_options = bkpt_sp->GetOptions();
655     Status error =
656         bkpt_sp->GetTarget()
657             .GetDebugger()
658             .GetScriptInterpreter()
659             ->SetBreakpointCommandCallback(bp_options, callback_body_text);
660     sb_error.SetError(error);
661   } else
662     sb_error.SetErrorString("invalid breakpoint");
663 
664   return LLDB_RECORD_RESULT(sb_error);
665 }
666 
667 bool SBBreakpoint::AddName(const char *new_name) {
668   LLDB_RECORD_METHOD(bool, SBBreakpoint, AddName, (const char *), new_name);
669 
670   SBError status = AddNameWithErrorHandling(new_name);
671   return status.Success();
672 }
673 
674 SBError SBBreakpoint::AddNameWithErrorHandling(const char *new_name) {
675   LLDB_RECORD_METHOD(SBError, SBBreakpoint, AddNameWithErrorHandling,
676                      (const char *), new_name);
677 
678   BreakpointSP bkpt_sp = GetSP();
679 
680   SBError status;
681   if (bkpt_sp) {
682     std::lock_guard<std::recursive_mutex> guard(
683         bkpt_sp->GetTarget().GetAPIMutex());
684     Status error;
685     bkpt_sp->GetTarget().AddNameToBreakpoint(bkpt_sp, new_name, error);
686     status.SetError(error);
687   } else {
688     status.SetErrorString("invalid breakpoint");
689   }
690 
691   return LLDB_RECORD_RESULT(status);
692 }
693 
694 void SBBreakpoint::RemoveName(const char *name_to_remove) {
695   LLDB_RECORD_METHOD(void, SBBreakpoint, RemoveName, (const char *),
696                      name_to_remove);
697 
698   BreakpointSP bkpt_sp = GetSP();
699 
700   if (bkpt_sp) {
701     std::lock_guard<std::recursive_mutex> guard(
702         bkpt_sp->GetTarget().GetAPIMutex());
703     bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp,
704                                                   ConstString(name_to_remove));
705   }
706 }
707 
708 bool SBBreakpoint::MatchesName(const char *name) {
709   LLDB_RECORD_METHOD(bool, SBBreakpoint, MatchesName, (const char *), name);
710 
711   BreakpointSP bkpt_sp = GetSP();
712 
713   if (bkpt_sp) {
714     std::lock_guard<std::recursive_mutex> guard(
715         bkpt_sp->GetTarget().GetAPIMutex());
716     return bkpt_sp->MatchesName(name);
717   }
718 
719   return false;
720 }
721 
722 void SBBreakpoint::GetNames(SBStringList &names) {
723   LLDB_RECORD_METHOD(void, SBBreakpoint, GetNames, (lldb::SBStringList &),
724                      names);
725 
726   BreakpointSP bkpt_sp = GetSP();
727 
728   if (bkpt_sp) {
729     std::lock_guard<std::recursive_mutex> guard(
730         bkpt_sp->GetTarget().GetAPIMutex());
731     std::vector<std::string> names_vec;
732     bkpt_sp->GetNames(names_vec);
733     for (std::string name : names_vec) {
734       names.AppendString(name.c_str());
735     }
736   }
737 }
738 
739 bool SBBreakpoint::EventIsBreakpointEvent(const lldb::SBEvent &event) {
740   LLDB_RECORD_STATIC_METHOD(bool, SBBreakpoint, EventIsBreakpointEvent,
741                             (const lldb::SBEvent &), event);
742 
743   return Breakpoint::BreakpointEventData::GetEventDataFromEvent(event.get()) !=
744          nullptr;
745 }
746 
747 BreakpointEventType
748 SBBreakpoint::GetBreakpointEventTypeFromEvent(const SBEvent &event) {
749   LLDB_RECORD_STATIC_METHOD(lldb::BreakpointEventType, SBBreakpoint,
750                             GetBreakpointEventTypeFromEvent,
751                             (const lldb::SBEvent &), event);
752 
753   if (event.IsValid())
754     return Breakpoint::BreakpointEventData::GetBreakpointEventTypeFromEvent(
755         event.GetSP());
756   return eBreakpointEventTypeInvalidType;
757 }
758 
759 SBBreakpoint SBBreakpoint::GetBreakpointFromEvent(const lldb::SBEvent &event) {
760   LLDB_RECORD_STATIC_METHOD(lldb::SBBreakpoint, SBBreakpoint,
761                             GetBreakpointFromEvent, (const lldb::SBEvent &),
762                             event);
763 
764   if (event.IsValid())
765     return LLDB_RECORD_RESULT(
766         SBBreakpoint(Breakpoint::BreakpointEventData::GetBreakpointFromEvent(
767             event.GetSP())));
768   return LLDB_RECORD_RESULT(SBBreakpoint());
769 }
770 
771 SBBreakpointLocation
772 SBBreakpoint::GetBreakpointLocationAtIndexFromEvent(const lldb::SBEvent &event,
773                                                     uint32_t loc_idx) {
774   LLDB_RECORD_STATIC_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
775                             GetBreakpointLocationAtIndexFromEvent,
776                             (const lldb::SBEvent &, uint32_t), event, loc_idx);
777 
778   SBBreakpointLocation sb_breakpoint_loc;
779   if (event.IsValid())
780     sb_breakpoint_loc.SetLocation(
781         Breakpoint::BreakpointEventData::GetBreakpointLocationAtIndexFromEvent(
782             event.GetSP(), loc_idx));
783   return LLDB_RECORD_RESULT(sb_breakpoint_loc);
784 }
785 
786 uint32_t
787 SBBreakpoint::GetNumBreakpointLocationsFromEvent(const lldb::SBEvent &event) {
788   LLDB_RECORD_STATIC_METHOD(uint32_t, SBBreakpoint,
789                             GetNumBreakpointLocationsFromEvent,
790                             (const lldb::SBEvent &), event);
791 
792   uint32_t num_locations = 0;
793   if (event.IsValid())
794     num_locations =
795         (Breakpoint::BreakpointEventData::GetNumBreakpointLocationsFromEvent(
796             event.GetSP()));
797   return num_locations;
798 }
799 
800 bool SBBreakpoint::IsHardware() const {
801   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsHardware);
802 
803   BreakpointSP bkpt_sp = GetSP();
804   if (bkpt_sp)
805     return bkpt_sp->IsHardware();
806   return false;
807 }
808 
809 BreakpointSP SBBreakpoint::GetSP() const { return m_opaque_wp.lock(); }
810 
811 // This is simple collection of breakpoint id's and their target.
812 class SBBreakpointListImpl {
813 public:
814   SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
815     if (target_sp && target_sp->IsValid())
816       m_target_wp = target_sp;
817   }
818 
819   ~SBBreakpointListImpl() = default;
820 
821   size_t GetSize() { return m_break_ids.size(); }
822 
823   BreakpointSP GetBreakpointAtIndex(size_t idx) {
824     if (idx >= m_break_ids.size())
825       return BreakpointSP();
826     TargetSP target_sp = m_target_wp.lock();
827     if (!target_sp)
828       return BreakpointSP();
829     lldb::break_id_t bp_id = m_break_ids[idx];
830     return target_sp->GetBreakpointList().FindBreakpointByID(bp_id);
831   }
832 
833   BreakpointSP FindBreakpointByID(lldb::break_id_t desired_id) {
834     TargetSP target_sp = m_target_wp.lock();
835     if (!target_sp)
836       return BreakpointSP();
837 
838     for (lldb::break_id_t &break_id : m_break_ids) {
839       if (break_id == desired_id)
840         return target_sp->GetBreakpointList().FindBreakpointByID(break_id);
841     }
842     return BreakpointSP();
843   }
844 
845   bool Append(BreakpointSP bkpt) {
846     TargetSP target_sp = m_target_wp.lock();
847     if (!target_sp || !bkpt)
848       return false;
849     if (bkpt->GetTargetSP() != target_sp)
850       return false;
851     m_break_ids.push_back(bkpt->GetID());
852     return true;
853   }
854 
855   bool AppendIfUnique(BreakpointSP bkpt) {
856     TargetSP target_sp = m_target_wp.lock();
857     if (!target_sp || !bkpt)
858       return false;
859     if (bkpt->GetTargetSP() != target_sp)
860       return false;
861     lldb::break_id_t bp_id = bkpt->GetID();
862     if (find(m_break_ids.begin(), m_break_ids.end(), bp_id) ==
863         m_break_ids.end())
864       return false;
865 
866     m_break_ids.push_back(bkpt->GetID());
867     return true;
868   }
869 
870   bool AppendByID(lldb::break_id_t id) {
871     TargetSP target_sp = m_target_wp.lock();
872     if (!target_sp)
873       return false;
874     if (id == LLDB_INVALID_BREAK_ID)
875       return false;
876     m_break_ids.push_back(id);
877     return true;
878   }
879 
880   void Clear() { m_break_ids.clear(); }
881 
882   void CopyToBreakpointIDList(lldb_private::BreakpointIDList &bp_list) {
883     for (lldb::break_id_t id : m_break_ids) {
884       bp_list.AddBreakpointID(BreakpointID(id));
885     }
886   }
887 
888   TargetSP GetTarget() { return m_target_wp.lock(); }
889 
890 private:
891   std::vector<lldb::break_id_t> m_break_ids;
892   TargetWP m_target_wp;
893 };
894 
895 SBBreakpointList::SBBreakpointList(SBTarget &target)
896     : m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {
897   LLDB_RECORD_CONSTRUCTOR(SBBreakpointList, (lldb::SBTarget &), target);
898 }
899 
900 SBBreakpointList::~SBBreakpointList() = default;
901 
902 size_t SBBreakpointList::GetSize() const {
903   LLDB_RECORD_METHOD_CONST_NO_ARGS(size_t, SBBreakpointList, GetSize);
904 
905   if (!m_opaque_sp)
906     return 0;
907   else
908     return m_opaque_sp->GetSize();
909 }
910 
911 SBBreakpoint SBBreakpointList::GetBreakpointAtIndex(size_t idx) {
912   LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBBreakpointList, GetBreakpointAtIndex,
913                      (size_t), idx);
914 
915   if (!m_opaque_sp)
916     return LLDB_RECORD_RESULT(SBBreakpoint());
917 
918   BreakpointSP bkpt_sp = m_opaque_sp->GetBreakpointAtIndex(idx);
919   return LLDB_RECORD_RESULT(SBBreakpoint(bkpt_sp));
920 }
921 
922 SBBreakpoint SBBreakpointList::FindBreakpointByID(lldb::break_id_t id) {
923   LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBBreakpointList, FindBreakpointByID,
924                      (lldb::break_id_t), id);
925 
926   if (!m_opaque_sp)
927     return LLDB_RECORD_RESULT(SBBreakpoint());
928   BreakpointSP bkpt_sp = m_opaque_sp->FindBreakpointByID(id);
929   return LLDB_RECORD_RESULT(SBBreakpoint(bkpt_sp));
930 }
931 
932 void SBBreakpointList::Append(const SBBreakpoint &sb_bkpt) {
933   LLDB_RECORD_METHOD(void, SBBreakpointList, Append,
934                      (const lldb::SBBreakpoint &), sb_bkpt);
935 
936   if (!sb_bkpt.IsValid())
937     return;
938   if (!m_opaque_sp)
939     return;
940   m_opaque_sp->Append(sb_bkpt.m_opaque_wp.lock());
941 }
942 
943 void SBBreakpointList::AppendByID(lldb::break_id_t id) {
944   LLDB_RECORD_METHOD(void, SBBreakpointList, AppendByID, (lldb::break_id_t),
945                      id);
946 
947   if (!m_opaque_sp)
948     return;
949   m_opaque_sp->AppendByID(id);
950 }
951 
952 bool SBBreakpointList::AppendIfUnique(const SBBreakpoint &sb_bkpt) {
953   LLDB_RECORD_METHOD(bool, SBBreakpointList, AppendIfUnique,
954                      (const lldb::SBBreakpoint &), sb_bkpt);
955 
956   if (!sb_bkpt.IsValid())
957     return false;
958   if (!m_opaque_sp)
959     return false;
960   return m_opaque_sp->AppendIfUnique(sb_bkpt.GetSP());
961 }
962 
963 void SBBreakpointList::Clear() {
964   LLDB_RECORD_METHOD_NO_ARGS(void, SBBreakpointList, Clear);
965 
966   if (m_opaque_sp)
967     m_opaque_sp->Clear();
968 }
969 
970 void SBBreakpointList::CopyToBreakpointIDList(
971     lldb_private::BreakpointIDList &bp_id_list) {
972   if (m_opaque_sp)
973     m_opaque_sp->CopyToBreakpointIDList(bp_id_list);
974 }
975 
976 namespace lldb_private {
977 namespace repro {
978 
979 template <>
980 void RegisterMethods<SBBreakpoint>(Registry &R) {
981   LLDB_REGISTER_CONSTRUCTOR(SBBreakpoint, ());
982   LLDB_REGISTER_CONSTRUCTOR(SBBreakpoint, (const lldb::SBBreakpoint &));
983   LLDB_REGISTER_CONSTRUCTOR(SBBreakpoint, (const lldb::BreakpointSP &));
984   LLDB_REGISTER_METHOD(const lldb::SBBreakpoint &,
985                        SBBreakpoint, operator=,(const lldb::SBBreakpoint &));
986   LLDB_REGISTER_METHOD(bool,
987                        SBBreakpoint, operator==,(const lldb::SBBreakpoint &));
988   LLDB_REGISTER_METHOD(bool,
989                        SBBreakpoint, operator!=,(const lldb::SBBreakpoint &));
990   LLDB_REGISTER_METHOD_CONST(lldb::break_id_t, SBBreakpoint, GetID, ());
991   LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsValid, ());
992   LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, operator bool, ());
993   LLDB_REGISTER_METHOD(void, SBBreakpoint, ClearAllBreakpointSites, ());
994   LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
995                        FindLocationByAddress, (lldb::addr_t));
996   LLDB_REGISTER_METHOD(lldb::break_id_t, SBBreakpoint,
997                        FindLocationIDByAddress, (lldb::addr_t));
998   LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
999                        FindLocationByID, (lldb::break_id_t));
1000   LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
1001                        GetLocationAtIndex, (uint32_t));
1002   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetEnabled, (bool));
1003   LLDB_REGISTER_METHOD(bool, SBBreakpoint, IsEnabled, ());
1004   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetOneShot, (bool));
1005   LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsOneShot, ());
1006   LLDB_REGISTER_METHOD(bool, SBBreakpoint, IsInternal, ());
1007   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetIgnoreCount, (uint32_t));
1008   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetCondition, (const char *));
1009   LLDB_REGISTER_METHOD(const char *, SBBreakpoint, GetCondition, ());
1010   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetAutoContinue, (bool));
1011   LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetAutoContinue, ());
1012   LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetHitCount, ());
1013   LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetIgnoreCount, ());
1014   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetThreadID, (lldb::tid_t));
1015   LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpoint, GetThreadID, ());
1016   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetThreadIndex, (uint32_t));
1017   LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpoint, GetThreadIndex, ());
1018   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetThreadName, (const char *));
1019   LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpoint, GetThreadName, ());
1020   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetQueueName, (const char *));
1021   LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpoint, GetQueueName, ());
1022   LLDB_REGISTER_METHOD_CONST(size_t, SBBreakpoint, GetNumResolvedLocations,
1023                              ());
1024   LLDB_REGISTER_METHOD_CONST(size_t, SBBreakpoint, GetNumLocations, ());
1025   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetCommandLineCommands,
1026                        (lldb::SBStringList &));
1027   LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetCommandLineCommands,
1028                        (lldb::SBStringList &));
1029   LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetDescription,
1030                        (lldb::SBStream &));
1031   LLDB_REGISTER_METHOD(bool, SBBreakpoint, GetDescription,
1032                        (lldb::SBStream &, bool));
1033   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, AddLocation,
1034                        (lldb::SBAddress &));
1035   LLDB_REGISTER_METHOD(lldb::SBStructuredData, SBBreakpoint,
1036                        SerializeToStructuredData, ());
1037   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
1038                        (const char *));
1039   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackFunction,
1040                        (const char *, SBStructuredData &));
1041   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody,
1042                        (const char *));
1043   LLDB_REGISTER_METHOD(bool, SBBreakpoint, AddName, (const char *));
1044   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, AddNameWithErrorHandling,
1045                        (const char *));
1046   LLDB_REGISTER_METHOD(void, SBBreakpoint, RemoveName, (const char *));
1047   LLDB_REGISTER_METHOD(bool, SBBreakpoint, MatchesName, (const char *));
1048   LLDB_REGISTER_METHOD(void, SBBreakpoint, GetNames, (lldb::SBStringList &));
1049   LLDB_REGISTER_STATIC_METHOD(bool, SBBreakpoint, EventIsBreakpointEvent,
1050                               (const lldb::SBEvent &));
1051   LLDB_REGISTER_STATIC_METHOD(lldb::BreakpointEventType, SBBreakpoint,
1052                               GetBreakpointEventTypeFromEvent,
1053                               (const lldb::SBEvent &));
1054   LLDB_REGISTER_STATIC_METHOD(lldb::SBBreakpoint, SBBreakpoint,
1055                               GetBreakpointFromEvent,
1056                               (const lldb::SBEvent &));
1057   LLDB_REGISTER_STATIC_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
1058                               GetBreakpointLocationAtIndexFromEvent,
1059                               (const lldb::SBEvent &, uint32_t));
1060   LLDB_REGISTER_STATIC_METHOD(uint32_t, SBBreakpoint,
1061                               GetNumBreakpointLocationsFromEvent,
1062                               (const lldb::SBEvent &));
1063   LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsHardware, ());
1064 }
1065 
1066 template <>
1067 void RegisterMethods<SBBreakpointList>(Registry &R) {
1068   LLDB_REGISTER_CONSTRUCTOR(SBBreakpointList, (lldb::SBTarget &));
1069   LLDB_REGISTER_METHOD_CONST(size_t, SBBreakpointList, GetSize, ());
1070   LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointList,
1071                        GetBreakpointAtIndex, (size_t));
1072   LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointList,
1073                        FindBreakpointByID, (lldb::break_id_t));
1074   LLDB_REGISTER_METHOD(void, SBBreakpointList, Append,
1075                        (const lldb::SBBreakpoint &));
1076   LLDB_REGISTER_METHOD(void, SBBreakpointList, AppendByID,
1077                        (lldb::break_id_t));
1078   LLDB_REGISTER_METHOD(bool, SBBreakpointList, AppendIfUnique,
1079                        (const lldb::SBBreakpoint &));
1080   LLDB_REGISTER_METHOD(void, SBBreakpointList, Clear, ());
1081 }
1082 
1083 }
1084 }
1085