Raphael Isemann | 8081428 | 2020-01-24 08:23:27 +0100 | [diff] [blame] | 1 | //===-- SBBreakpointLocation.cpp ------------------------------------------===// |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "lldb/API/SBBreakpointLocation.h" |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 10 | #include "SBReproducerPrivate.h" |
Greg Clayton | f644ddf | 2011-09-24 01:37:21 +0000 | [diff] [blame] | 11 | #include "lldb/API/SBAddress.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 12 | #include "lldb/API/SBDebugger.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 13 | #include "lldb/API/SBDefines.h" |
Caroline Tice | dde9cff | 2010-09-20 05:20:02 +0000 | [diff] [blame] | 14 | #include "lldb/API/SBStream.h" |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 15 | #include "lldb/API/SBStructuredData.h" |
Jim Ingham | af26b22 | 2017-08-02 00:16:10 +0000 | [diff] [blame] | 16 | #include "lldb/API/SBStringList.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 17 | |
Greg Clayton | 4e78f60 | 2010-11-18 18:52:36 +0000 | [diff] [blame] | 18 | #include "lldb/Breakpoint/Breakpoint.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 19 | #include "lldb/Breakpoint/BreakpointLocation.h" |
Jim Ingham | d80102e | 2014-04-02 01:04:55 +0000 | [diff] [blame] | 20 | #include "lldb/Core/Debugger.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 21 | #include "lldb/Core/StreamFile.h" |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 22 | #include "lldb/Core/StructuredDataImpl.h" |
Jim Ingham | d80102e | 2014-04-02 01:04:55 +0000 | [diff] [blame] | 23 | #include "lldb/Interpreter/CommandInterpreter.h" |
| 24 | #include "lldb/Interpreter/ScriptInterpreter.h" |
Greg Clayton | af67cec | 2010-12-20 20:49:23 +0000 | [diff] [blame] | 25 | #include "lldb/Target/Target.h" |
Jim Ingham | 62b02c6 | 2010-06-18 01:47:08 +0000 | [diff] [blame] | 26 | #include "lldb/Target/ThreadSpec.h" |
Zachary Turner | bf9a773 | 2017-02-02 21:39:50 +0000 | [diff] [blame] | 27 | #include "lldb/Utility/Stream.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 28 | #include "lldb/lldb-defines.h" |
| 29 | #include "lldb/lldb-types.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 30 | |
| 31 | using namespace lldb; |
| 32 | using namespace lldb_private; |
| 33 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 34 | SBBreakpointLocation::SBBreakpointLocation() { |
| 35 | LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBreakpointLocation); |
| 36 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 37 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 38 | SBBreakpointLocation::SBBreakpointLocation( |
| 39 | const lldb::BreakpointLocationSP &break_loc_sp) |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 40 | : m_opaque_wp(break_loc_sp) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 41 | LLDB_RECORD_CONSTRUCTOR(SBBreakpointLocation, |
| 42 | (const lldb::BreakpointLocationSP &), break_loc_sp); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 45 | SBBreakpointLocation::SBBreakpointLocation(const SBBreakpointLocation &rhs) |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 46 | : m_opaque_wp(rhs.m_opaque_wp) { |
| 47 | LLDB_RECORD_CONSTRUCTOR(SBBreakpointLocation, |
| 48 | (const lldb::SBBreakpointLocation &), rhs); |
| 49 | } |
Caroline Tice | ceb6b13 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 50 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 51 | const SBBreakpointLocation &SBBreakpointLocation:: |
| 52 | operator=(const SBBreakpointLocation &rhs) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 53 | LLDB_RECORD_METHOD( |
| 54 | const lldb::SBBreakpointLocation &, |
| 55 | SBBreakpointLocation, operator=,(const lldb::SBBreakpointLocation &), |
| 56 | rhs); |
| 57 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 58 | m_opaque_wp = rhs.m_opaque_wp; |
Jonas Devlieghere | 306809f | 2019-04-03 21:31:22 +0000 | [diff] [blame] | 59 | return LLDB_RECORD_RESULT(*this); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 60 | } |
| 61 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 62 | SBBreakpointLocation::~SBBreakpointLocation() {} |
| 63 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 64 | BreakpointLocationSP SBBreakpointLocation::GetSP() const { |
| 65 | return m_opaque_wp.lock(); |
| 66 | } |
| 67 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 68 | bool SBBreakpointLocation::IsValid() const { |
| 69 | LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointLocation, IsValid); |
Pavel Labath | 7f5237b | 2019-03-11 13:58:46 +0000 | [diff] [blame] | 70 | return this->operator bool(); |
| 71 | } |
| 72 | SBBreakpointLocation::operator bool() const { |
| 73 | LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointLocation, operator bool); |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 74 | |
| 75 | return bool(GetSP()); |
| 76 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 77 | |
| 78 | SBAddress SBBreakpointLocation::GetAddress() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 79 | LLDB_RECORD_METHOD_NO_ARGS(lldb::SBAddress, SBBreakpointLocation, GetAddress); |
| 80 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 81 | BreakpointLocationSP loc_sp = GetSP(); |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 82 | if (loc_sp) { |
| 83 | return LLDB_RECORD_RESULT(SBAddress(&loc_sp->GetAddress())); |
| 84 | } |
| 85 | |
| 86 | return LLDB_RECORD_RESULT(SBAddress()); |
Greg Clayton | efabb12 | 2010-11-05 23:17:00 +0000 | [diff] [blame] | 87 | } |
| 88 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 89 | addr_t SBBreakpointLocation::GetLoadAddress() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 90 | LLDB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBBreakpointLocation, |
| 91 | GetLoadAddress); |
| 92 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 93 | addr_t ret_addr = LLDB_INVALID_ADDRESS; |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 94 | BreakpointLocationSP loc_sp = GetSP(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 95 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 96 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 97 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 98 | loc_sp->GetTarget().GetAPIMutex()); |
| 99 | ret_addr = loc_sp->GetLoadAddress(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | return ret_addr; |
Greg Clayton | efabb12 | 2010-11-05 23:17:00 +0000 | [diff] [blame] | 103 | } |
| 104 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 105 | void SBBreakpointLocation::SetEnabled(bool enabled) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 106 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetEnabled, (bool), enabled); |
| 107 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 108 | BreakpointLocationSP loc_sp = GetSP(); |
| 109 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 110 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 111 | loc_sp->GetTarget().GetAPIMutex()); |
| 112 | loc_sp->SetEnabled(enabled); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 113 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 114 | } |
| 115 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 116 | bool SBBreakpointLocation::IsEnabled() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 117 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointLocation, IsEnabled); |
| 118 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 119 | BreakpointLocationSP loc_sp = GetSP(); |
| 120 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 121 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 122 | loc_sp->GetTarget().GetAPIMutex()); |
| 123 | return loc_sp->IsEnabled(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 124 | } else |
Greg Clayton | af67cec | 2010-12-20 20:49:23 +0000 | [diff] [blame] | 125 | return false; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 126 | } |
| 127 | |
Bruce Mitchener | ccbf798 | 2017-07-19 14:31:19 +0000 | [diff] [blame] | 128 | uint32_t SBBreakpointLocation::GetHitCount() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 129 | LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBBreakpointLocation, GetHitCount); |
| 130 | |
Bruce Mitchener | ccbf798 | 2017-07-19 14:31:19 +0000 | [diff] [blame] | 131 | BreakpointLocationSP loc_sp = GetSP(); |
| 132 | if (loc_sp) { |
| 133 | std::lock_guard<std::recursive_mutex> guard( |
| 134 | loc_sp->GetTarget().GetAPIMutex()); |
| 135 | return loc_sp->GetHitCount(); |
| 136 | } else |
| 137 | return 0; |
| 138 | } |
| 139 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 140 | uint32_t SBBreakpointLocation::GetIgnoreCount() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 141 | LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBBreakpointLocation, GetIgnoreCount); |
| 142 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 143 | BreakpointLocationSP loc_sp = GetSP(); |
| 144 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 145 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 146 | loc_sp->GetTarget().GetAPIMutex()); |
| 147 | return loc_sp->GetIgnoreCount(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 148 | } else |
| 149 | return 0; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 150 | } |
| 151 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 152 | void SBBreakpointLocation::SetIgnoreCount(uint32_t n) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 153 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetIgnoreCount, (uint32_t), n); |
| 154 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 155 | BreakpointLocationSP loc_sp = GetSP(); |
| 156 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 157 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 158 | loc_sp->GetTarget().GetAPIMutex()); |
| 159 | loc_sp->SetIgnoreCount(n); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 160 | } |
Caroline Tice | dde9cff | 2010-09-20 05:20:02 +0000 | [diff] [blame] | 161 | } |
| 162 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 163 | void SBBreakpointLocation::SetCondition(const char *condition) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 164 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetCondition, (const char *), |
| 165 | condition); |
| 166 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 167 | BreakpointLocationSP loc_sp = GetSP(); |
| 168 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 169 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 170 | loc_sp->GetTarget().GetAPIMutex()); |
| 171 | loc_sp->SetCondition(condition); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 172 | } |
Jim Ingham | b08a944 | 2012-05-16 00:51:15 +0000 | [diff] [blame] | 173 | } |
| 174 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 175 | const char *SBBreakpointLocation::GetCondition() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 176 | LLDB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpointLocation, GetCondition); |
| 177 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 178 | BreakpointLocationSP loc_sp = GetSP(); |
| 179 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 180 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 181 | loc_sp->GetTarget().GetAPIMutex()); |
| 182 | return loc_sp->GetConditionText(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 183 | } |
Konrad Kleine | 248a130 | 2019-05-23 11:14:47 +0000 | [diff] [blame] | 184 | return nullptr; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 185 | } |
| 186 | |
Jim Ingham | f08f5c9 | 2017-08-03 18:13:24 +0000 | [diff] [blame] | 187 | void SBBreakpointLocation::SetAutoContinue(bool auto_continue) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 188 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetAutoContinue, (bool), |
| 189 | auto_continue); |
| 190 | |
Jim Ingham | f08f5c9 | 2017-08-03 18:13:24 +0000 | [diff] [blame] | 191 | BreakpointLocationSP loc_sp = GetSP(); |
| 192 | if (loc_sp) { |
| 193 | std::lock_guard<std::recursive_mutex> guard( |
| 194 | loc_sp->GetTarget().GetAPIMutex()); |
| 195 | loc_sp->SetAutoContinue(auto_continue); |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | bool SBBreakpointLocation::GetAutoContinue() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 200 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointLocation, GetAutoContinue); |
| 201 | |
Jim Ingham | f08f5c9 | 2017-08-03 18:13:24 +0000 | [diff] [blame] | 202 | BreakpointLocationSP loc_sp = GetSP(); |
| 203 | if (loc_sp) { |
| 204 | std::lock_guard<std::recursive_mutex> guard( |
| 205 | loc_sp->GetTarget().GetAPIMutex()); |
| 206 | return loc_sp->IsAutoContinue(); |
| 207 | } |
Jim Ingham | 1c7dc82 | 2017-08-03 19:38:38 +0000 | [diff] [blame] | 208 | return false; |
Jim Ingham | f08f5c9 | 2017-08-03 18:13:24 +0000 | [diff] [blame] | 209 | } |
| 210 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 211 | void SBBreakpointLocation::SetScriptCallbackFunction( |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 212 | const char *callback_function_name) { |
| 213 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction, |
| 214 | (const char *), callback_function_name); |
| 215 | } |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 216 | |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 217 | SBError SBBreakpointLocation::SetScriptCallbackFunction( |
| 218 | const char *callback_function_name, |
| 219 | SBStructuredData &extra_args) { |
| 220 | LLDB_RECORD_METHOD(SBError, SBBreakpointLocation, SetScriptCallbackFunction, |
| 221 | (const char *, SBStructuredData &), |
| 222 | callback_function_name, extra_args); |
| 223 | SBError sb_error; |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 224 | BreakpointLocationSP loc_sp = GetSP(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 225 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 226 | if (loc_sp) { |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 227 | Status error; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 228 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 229 | loc_sp->GetTarget().GetAPIMutex()); |
| 230 | BreakpointOptions *bp_options = loc_sp->GetLocationOptions(); |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 231 | error = loc_sp->GetBreakpoint() |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 232 | .GetTarget() |
| 233 | .GetDebugger() |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 234 | .GetScriptInterpreter() |
| 235 | ->SetBreakpointCommandCallbackFunction(bp_options, |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 236 | callback_function_name, |
| 237 | extra_args.m_impl_up |
| 238 | ->GetObjectSP()); |
| 239 | sb_error.SetError(error); |
| 240 | } else |
| 241 | sb_error.SetErrorString("invalid breakpoint"); |
| 242 | |
| 243 | return LLDB_RECORD_RESULT(sb_error); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 244 | } |
| 245 | |
| 246 | SBError |
| 247 | SBBreakpointLocation::SetScriptCallbackBody(const char *callback_body_text) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 248 | LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointLocation, SetScriptCallbackBody, |
| 249 | (const char *), callback_body_text); |
| 250 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 251 | BreakpointLocationSP loc_sp = GetSP(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 252 | |
| 253 | SBError sb_error; |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 254 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 255 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 256 | loc_sp->GetTarget().GetAPIMutex()); |
| 257 | BreakpointOptions *bp_options = loc_sp->GetLocationOptions(); |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 258 | Status error = |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 259 | loc_sp->GetBreakpoint() |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 260 | .GetTarget() |
| 261 | .GetDebugger() |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 262 | .GetScriptInterpreter() |
| 263 | ->SetBreakpointCommandCallback(bp_options, callback_body_text); |
| 264 | sb_error.SetError(error); |
| 265 | } else |
| 266 | sb_error.SetErrorString("invalid breakpoint"); |
| 267 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 268 | return LLDB_RECORD_RESULT(sb_error); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 269 | } |
| 270 | |
Jim Ingham | af26b22 | 2017-08-02 00:16:10 +0000 | [diff] [blame] | 271 | void SBBreakpointLocation::SetCommandLineCommands(SBStringList &commands) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 272 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetCommandLineCommands, |
| 273 | (lldb::SBStringList &), commands); |
| 274 | |
Jim Ingham | af26b22 | 2017-08-02 00:16:10 +0000 | [diff] [blame] | 275 | BreakpointLocationSP loc_sp = GetSP(); |
| 276 | if (!loc_sp) |
| 277 | return; |
| 278 | if (commands.GetSize() == 0) |
| 279 | return; |
| 280 | |
| 281 | std::lock_guard<std::recursive_mutex> guard( |
| 282 | loc_sp->GetTarget().GetAPIMutex()); |
| 283 | std::unique_ptr<BreakpointOptions::CommandData> cmd_data_up( |
| 284 | new BreakpointOptions::CommandData(*commands, eScriptLanguageNone)); |
| 285 | |
| 286 | loc_sp->GetLocationOptions()->SetCommandDataCallback(cmd_data_up); |
| 287 | } |
| 288 | |
| 289 | bool SBBreakpointLocation::GetCommandLineCommands(SBStringList &commands) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 290 | LLDB_RECORD_METHOD(bool, SBBreakpointLocation, GetCommandLineCommands, |
| 291 | (lldb::SBStringList &), commands); |
| 292 | |
Jim Ingham | af26b22 | 2017-08-02 00:16:10 +0000 | [diff] [blame] | 293 | BreakpointLocationSP loc_sp = GetSP(); |
| 294 | if (!loc_sp) |
| 295 | return false; |
| 296 | StringList command_list; |
| 297 | bool has_commands = |
| 298 | loc_sp->GetLocationOptions()->GetCommandLineCallbacks(command_list); |
| 299 | if (has_commands) |
| 300 | commands.AppendList(command_list); |
| 301 | return has_commands; |
| 302 | } |
| 303 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 304 | void SBBreakpointLocation::SetThreadID(tid_t thread_id) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 305 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetThreadID, (lldb::tid_t), |
| 306 | thread_id); |
| 307 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 308 | BreakpointLocationSP loc_sp = GetSP(); |
| 309 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 310 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 311 | loc_sp->GetTarget().GetAPIMutex()); |
| 312 | loc_sp->SetThreadID(thread_id); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 313 | } |
| 314 | } |
| 315 | |
| 316 | tid_t SBBreakpointLocation::GetThreadID() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 317 | LLDB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBBreakpointLocation, GetThreadID); |
| 318 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 319 | tid_t tid = LLDB_INVALID_THREAD_ID; |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 320 | BreakpointLocationSP loc_sp = GetSP(); |
| 321 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 322 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 323 | loc_sp->GetTarget().GetAPIMutex()); |
| 324 | return loc_sp->GetThreadID(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 325 | } |
| 326 | return tid; |
| 327 | } |
| 328 | |
| 329 | void SBBreakpointLocation::SetThreadIndex(uint32_t index) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 330 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetThreadIndex, (uint32_t), |
| 331 | index); |
| 332 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 333 | BreakpointLocationSP loc_sp = GetSP(); |
| 334 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 335 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 336 | loc_sp->GetTarget().GetAPIMutex()); |
| 337 | loc_sp->SetThreadIndex(index); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 338 | } |
| 339 | } |
| 340 | |
| 341 | uint32_t SBBreakpointLocation::GetThreadIndex() const { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 342 | LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointLocation, |
| 343 | GetThreadIndex); |
| 344 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 345 | uint32_t thread_idx = UINT32_MAX; |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 346 | BreakpointLocationSP loc_sp = GetSP(); |
| 347 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 348 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 349 | loc_sp->GetTarget().GetAPIMutex()); |
| 350 | return loc_sp->GetThreadIndex(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 351 | } |
| 352 | return thread_idx; |
| 353 | } |
| 354 | |
| 355 | void SBBreakpointLocation::SetThreadName(const char *thread_name) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 356 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetThreadName, (const char *), |
| 357 | thread_name); |
| 358 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 359 | BreakpointLocationSP loc_sp = GetSP(); |
| 360 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 361 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 362 | loc_sp->GetTarget().GetAPIMutex()); |
| 363 | loc_sp->SetThreadName(thread_name); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 364 | } |
| 365 | } |
| 366 | |
| 367 | const char *SBBreakpointLocation::GetThreadName() const { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 368 | LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointLocation, |
| 369 | GetThreadName); |
| 370 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 371 | BreakpointLocationSP loc_sp = GetSP(); |
| 372 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 373 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 374 | loc_sp->GetTarget().GetAPIMutex()); |
| 375 | return loc_sp->GetThreadName(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 376 | } |
Konrad Kleine | 248a130 | 2019-05-23 11:14:47 +0000 | [diff] [blame] | 377 | return nullptr; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 378 | } |
| 379 | |
| 380 | void SBBreakpointLocation::SetQueueName(const char *queue_name) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 381 | LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetQueueName, (const char *), |
| 382 | queue_name); |
| 383 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 384 | BreakpointLocationSP loc_sp = GetSP(); |
| 385 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 386 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 387 | loc_sp->GetTarget().GetAPIMutex()); |
| 388 | loc_sp->SetQueueName(queue_name); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 389 | } |
| 390 | } |
| 391 | |
| 392 | const char *SBBreakpointLocation::GetQueueName() const { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 393 | LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointLocation, |
| 394 | GetQueueName); |
| 395 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 396 | BreakpointLocationSP loc_sp = GetSP(); |
| 397 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 398 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 399 | loc_sp->GetTarget().GetAPIMutex()); |
| 400 | loc_sp->GetQueueName(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 401 | } |
Konrad Kleine | 248a130 | 2019-05-23 11:14:47 +0000 | [diff] [blame] | 402 | return nullptr; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 403 | } |
| 404 | |
| 405 | bool SBBreakpointLocation::IsResolved() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 406 | LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointLocation, IsResolved); |
| 407 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 408 | BreakpointLocationSP loc_sp = GetSP(); |
| 409 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 410 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 411 | loc_sp->GetTarget().GetAPIMutex()); |
| 412 | return loc_sp->IsResolved(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 413 | } |
| 414 | return false; |
| 415 | } |
| 416 | |
| 417 | void SBBreakpointLocation::SetLocation( |
| 418 | const lldb::BreakpointLocationSP &break_loc_sp) { |
| 419 | // Uninstall the callbacks? |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 420 | m_opaque_wp = break_loc_sp; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 421 | } |
| 422 | |
| 423 | bool SBBreakpointLocation::GetDescription(SBStream &description, |
| 424 | DescriptionLevel level) { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 425 | LLDB_RECORD_METHOD(bool, SBBreakpointLocation, GetDescription, |
| 426 | (lldb::SBStream &, lldb::DescriptionLevel), description, |
| 427 | level); |
| 428 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 429 | Stream &strm = description.ref(); |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 430 | BreakpointLocationSP loc_sp = GetSP(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 431 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 432 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 433 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 434 | loc_sp->GetTarget().GetAPIMutex()); |
| 435 | loc_sp->GetDescription(&strm, level); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 436 | strm.EOL(); |
| 437 | } else |
| 438 | strm.PutCString("No value"); |
| 439 | |
| 440 | return true; |
| 441 | } |
| 442 | |
| 443 | break_id_t SBBreakpointLocation::GetID() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 444 | LLDB_RECORD_METHOD_NO_ARGS(lldb::break_id_t, SBBreakpointLocation, GetID); |
| 445 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 446 | BreakpointLocationSP loc_sp = GetSP(); |
| 447 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 448 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 449 | loc_sp->GetTarget().GetAPIMutex()); |
| 450 | return loc_sp->GetID(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 451 | } else |
| 452 | return LLDB_INVALID_BREAK_ID; |
| 453 | } |
| 454 | |
| 455 | SBBreakpoint SBBreakpointLocation::GetBreakpoint() { |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 456 | LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBreakpoint, SBBreakpointLocation, |
| 457 | GetBreakpoint); |
| 458 | |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 459 | BreakpointLocationSP loc_sp = GetSP(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 460 | |
| 461 | SBBreakpoint sb_bp; |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 462 | if (loc_sp) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 463 | std::lock_guard<std::recursive_mutex> guard( |
Pavel Labath | c578943 | 2017-03-01 10:08:48 +0000 | [diff] [blame] | 464 | loc_sp->GetTarget().GetAPIMutex()); |
| 465 | sb_bp = loc_sp->GetBreakpoint().shared_from_this(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 466 | } |
| 467 | |
Jonas Devlieghere | baf5664 | 2019-03-06 00:06:00 +0000 | [diff] [blame] | 468 | return LLDB_RECORD_RESULT(sb_bp); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 469 | } |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 470 | |
| 471 | namespace lldb_private { |
| 472 | namespace repro { |
| 473 | |
| 474 | template <> |
| 475 | void RegisterMethods<SBBreakpointLocation>(Registry &R) { |
| 476 | LLDB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, ()); |
| 477 | LLDB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, |
| 478 | (const lldb::BreakpointLocationSP &)); |
| 479 | LLDB_REGISTER_CONSTRUCTOR(SBBreakpointLocation, |
| 480 | (const lldb::SBBreakpointLocation &)); |
| 481 | LLDB_REGISTER_METHOD( |
| 482 | const lldb::SBBreakpointLocation &, |
| 483 | SBBreakpointLocation, operator=,(const lldb::SBBreakpointLocation &)); |
| 484 | LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, IsValid, ()); |
| 485 | LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, operator bool, ()); |
| 486 | LLDB_REGISTER_METHOD(lldb::SBAddress, SBBreakpointLocation, GetAddress, ()); |
| 487 | LLDB_REGISTER_METHOD(lldb::addr_t, SBBreakpointLocation, GetLoadAddress, |
| 488 | ()); |
| 489 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetEnabled, (bool)); |
| 490 | LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, IsEnabled, ()); |
| 491 | LLDB_REGISTER_METHOD(uint32_t, SBBreakpointLocation, GetHitCount, ()); |
| 492 | LLDB_REGISTER_METHOD(uint32_t, SBBreakpointLocation, GetIgnoreCount, ()); |
| 493 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetIgnoreCount, |
| 494 | (uint32_t)); |
| 495 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetCondition, |
| 496 | (const char *)); |
| 497 | LLDB_REGISTER_METHOD(const char *, SBBreakpointLocation, GetCondition, ()); |
| 498 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetAutoContinue, (bool)); |
| 499 | LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetAutoContinue, ()); |
| 500 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction, |
| 501 | (const char *)); |
Jim Ingham | 738af7a | 2019-10-25 14:05:07 -0700 | [diff] [blame] | 502 | LLDB_REGISTER_METHOD(SBError, SBBreakpointLocation, SetScriptCallbackFunction, |
| 503 | (const char *, SBStructuredData &)); |
Michal Gorny | ae211ec | 2019-03-19 17:13:13 +0000 | [diff] [blame] | 504 | LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointLocation, |
| 505 | SetScriptCallbackBody, (const char *)); |
| 506 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetCommandLineCommands, |
| 507 | (lldb::SBStringList &)); |
| 508 | LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetCommandLineCommands, |
| 509 | (lldb::SBStringList &)); |
| 510 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadID, |
| 511 | (lldb::tid_t)); |
| 512 | LLDB_REGISTER_METHOD(lldb::tid_t, SBBreakpointLocation, GetThreadID, ()); |
| 513 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadIndex, |
| 514 | (uint32_t)); |
| 515 | LLDB_REGISTER_METHOD_CONST(uint32_t, SBBreakpointLocation, GetThreadIndex, |
| 516 | ()); |
| 517 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetThreadName, |
| 518 | (const char *)); |
| 519 | LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointLocation, |
| 520 | GetThreadName, ()); |
| 521 | LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetQueueName, |
| 522 | (const char *)); |
| 523 | LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointLocation, GetQueueName, |
| 524 | ()); |
| 525 | LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, IsResolved, ()); |
| 526 | LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetDescription, |
| 527 | (lldb::SBStream &, lldb::DescriptionLevel)); |
| 528 | LLDB_REGISTER_METHOD(lldb::break_id_t, SBBreakpointLocation, GetID, ()); |
| 529 | LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBBreakpointLocation, |
| 530 | GetBreakpoint, ()); |
| 531 | } |
| 532 | |
| 533 | } |
| 534 | } |