LLDB  mainline
Watchpoint.cpp
Go to the documentation of this file.
1 //===-- Watchpoint.cpp ----------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
12 #include "lldb/Core/Value.h"
13 #include "lldb/Core/ValueObject.h"
16 #include "lldb/Symbol/TypeSystem.h"
17 #include "lldb/Target/Process.h"
18 #include "lldb/Target/Target.h"
19 #include "lldb/Target/ThreadSpec.h"
20 #include "lldb/Utility/LLDBLog.h"
21 #include "lldb/Utility/Log.h"
22 #include "lldb/Utility/Stream.h"
23 
24 using namespace lldb;
25 using namespace lldb_private;
26 
27 Watchpoint::Watchpoint(Target &target, lldb::addr_t addr, uint32_t size,
28  const CompilerType *type, bool hardware)
29  : StoppointSite(0, addr, size, hardware), m_target(target),
30  m_enabled(false), m_is_hardware(hardware), m_is_watch_variable(false),
31  m_is_ephemeral(false), m_disabled_count(0), m_watch_read(0),
32  m_watch_write(0), m_watch_was_read(0), m_watch_was_written(0),
33  m_ignore_count(0), m_false_alarms(0), m_being_created(true) {
34 
35  if (type && type->IsValid())
36  m_type = *type;
37  else {
38  // If we don't have a known type, then we force it to unsigned int of the
39  // right size.
40  auto type_system_or_err =
42  if (auto err = type_system_or_err.takeError()) {
44  "Failed to set type.");
45  } else {
46  if (auto ts = *type_system_or_err)
47  m_type =
48  ts->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, 8 * size);
49  else
51  "Failed to set type. Typesystem is no longer live.");
52  }
53  }
54 
55  // Set the initial value of the watched variable:
56  if (m_target.GetProcessSP()) {
57  ExecutionContext exe_ctx;
58  m_target.GetProcessSP()->CalculateExecutionContext(exe_ctx);
59  CaptureWatchedValue(exe_ctx);
60  }
61  m_being_created = false;
62 }
63 
64 Watchpoint::~Watchpoint() = default;
65 
66 // This function is used when "baton" doesn't need to be freed
67 void Watchpoint::SetCallback(WatchpointHitCallback callback, void *baton,
68  bool is_synchronous) {
69  // The default "Baton" class will keep a copy of "baton" and won't free or
70  // delete it when it goes goes out of scope.
71  m_options.SetCallback(callback, std::make_shared<UntypedBaton>(baton),
72  is_synchronous);
73 
74  SendWatchpointChangedEvent(eWatchpointEventTypeCommandChanged);
75 }
76 
77 // This function is used when a baton needs to be freed and therefore is
78 // contained in a "Baton" subclass.
79 void Watchpoint::SetCallback(WatchpointHitCallback callback,
80  const BatonSP &callback_baton_sp,
81  bool is_synchronous) {
82  m_options.SetCallback(callback, callback_baton_sp, is_synchronous);
83  SendWatchpointChangedEvent(eWatchpointEventTypeCommandChanged);
84 }
85 
88  SendWatchpointChangedEvent(eWatchpointEventTypeCommandChanged);
89 }
90 
91 void Watchpoint::SetDeclInfo(const std::string &str) { m_decl_str = str; }
92 
94 
96  m_watch_spec_str = str;
97 }
98 
99 bool Watchpoint::IsHardware() const {
101  return m_is_hardware;
102 }
103 
105 
107 
109  ConstString watch_name("$__lldb__watch_value");
111  Address watch_address(GetLoadAddress());
112  if (!m_type.IsValid()) {
113  // Don't know how to report new & old values, since we couldn't make a
114  // scalar type for this watchpoint. This works around an assert in
115  // ValueObjectMemory::Create.
116  // FIXME: This should not happen, but if it does in some case we care about,
117  // we can go grab the value raw and print it as unsigned.
118  return false;
119  }
121  exe_ctx.GetBestExecutionContextScope(), watch_name.GetStringRef(),
122  watch_address, m_type);
123  m_new_value_sp = m_new_value_sp->CreateConstantValue(watch_name);
124  return (m_new_value_sp && m_new_value_sp->GetError().Success());
125 }
126 
128  ++m_false_alarms;
129  if (m_false_alarms) {
132  m_false_alarms = 0;
133  } else {
136  }
137  }
138 }
139 
140 // RETURNS - true if we should stop at this breakpoint, false if we
141 // should continue.
142 
145 
146  return IsEnabled();
147 }
148 
150  DumpWithLevel(s, level);
151 }
152 
153 void Watchpoint::Dump(Stream *s) const {
155 }
156 
157 // If prefix is nullptr, we display the watch id and ignore the prefix
158 // altogether.
159 void Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const {
160  if (!prefix) {
161  s->Printf("\nWatchpoint %u hit:", GetID());
162  prefix = "";
163  }
164 
165  if (m_old_value_sp) {
166  const char *old_value_cstr = m_old_value_sp->GetValueAsCString();
167  if (old_value_cstr && old_value_cstr[0])
168  s->Printf("\n%sold value: %s", prefix, old_value_cstr);
169  else {
170  const char *old_summary_cstr = m_old_value_sp->GetSummaryAsCString();
171  if (old_summary_cstr && old_summary_cstr[0])
172  s->Printf("\n%sold value: %s", prefix, old_summary_cstr);
173  }
174  }
175 
176  if (m_new_value_sp) {
177  const char *new_value_cstr = m_new_value_sp->GetValueAsCString();
178  if (new_value_cstr && new_value_cstr[0])
179  s->Printf("\n%snew value: %s", prefix, new_value_cstr);
180  else {
181  const char *new_summary_cstr = m_new_value_sp->GetSummaryAsCString();
182  if (new_summary_cstr && new_summary_cstr[0])
183  s->Printf("\n%snew value: %s", prefix, new_summary_cstr);
184  }
185  }
186 }
187 
189  lldb::DescriptionLevel description_level) const {
190  if (s == nullptr)
191  return;
192 
193  assert(description_level >= lldb::eDescriptionLevelBrief &&
194  description_level <= lldb::eDescriptionLevelVerbose);
195 
196  s->Printf("Watchpoint %u: addr = 0x%8.8" PRIx64
197  " size = %u state = %s type = %s%s",
199  IsEnabled() ? "enabled" : "disabled", m_watch_read ? "r" : "",
200  m_watch_write ? "w" : "");
201 
202  if (description_level >= lldb::eDescriptionLevelFull) {
203  if (!m_decl_str.empty())
204  s->Printf("\n declare @ '%s'", m_decl_str.c_str());
205  if (!m_watch_spec_str.empty())
206  s->Printf("\n watchpoint spec = '%s'", m_watch_spec_str.c_str());
207 
208  // Dump the snapshots we have taken.
209  DumpSnapshots(s, " ");
210 
211  if (GetConditionText())
212  s->Printf("\n condition = '%s'", GetConditionText());
213  m_options.GetCallbackDescription(s, description_level);
214  }
215 
216  if (description_level >= lldb::eDescriptionLevelVerbose) {
217  s->Printf("\n hw_index = %i hit_count = %-4u ignore_count = %-4u",
219  }
220 }
221 
222 bool Watchpoint::IsEnabled() const { return m_enabled; }
223 
224 // Within StopInfo.cpp, we purposely turn on the ephemeral mode right before
225 // temporarily disable the watchpoint in order to perform possible watchpoint
226 // actions without triggering further watchpoint events. After the temporary
227 // disabled watchpoint is enabled, we then turn off the ephemeral mode.
228 
230 
232  m_is_ephemeral = false;
233  // Leaving ephemeral mode, reset the m_disabled_count!
234  m_disabled_count = 0;
235 }
236 
238  return m_disabled_count > 1 && m_is_ephemeral;
239 }
240 
241 void Watchpoint::SetEnabled(bool enabled, bool notify) {
242  if (!enabled) {
243  if (!m_is_ephemeral)
245  else
247 
248  // Don't clear the snapshots for now.
249  // Within StopInfo.cpp, we purposely do disable/enable watchpoint while
250  // performing watchpoint actions.
251  }
252  bool changed = enabled != m_enabled;
253  m_enabled = enabled;
254  if (notify && !m_is_ephemeral && changed)
255  SendWatchpointChangedEvent(enabled ? eWatchpointEventTypeEnabled
256  : eWatchpointEventTypeDisabled);
257 }
258 
259 void Watchpoint::SetWatchpointType(uint32_t type, bool notify) {
260  int old_watch_read = m_watch_read;
261  int old_watch_write = m_watch_write;
262  m_watch_read = (type & LLDB_WATCH_TYPE_READ) != 0;
263  m_watch_write = (type & LLDB_WATCH_TYPE_WRITE) != 0;
264  if (notify &&
265  (old_watch_read != m_watch_read || old_watch_write != m_watch_write))
266  SendWatchpointChangedEvent(eWatchpointEventTypeTypeChanged);
267 }
268 
269 bool Watchpoint::WatchpointRead() const { return m_watch_read != 0; }
270 
271 bool Watchpoint::WatchpointWrite() const { return m_watch_write != 0; }
272 
274 
276  bool changed = m_ignore_count != n;
277  m_ignore_count = n;
278  if (changed)
279  SendWatchpointChangedEvent(eWatchpointEventTypeIgnoreChanged);
280 }
281 
283  return m_options.InvokeCallback(context, GetID());
284 }
285 
286 void Watchpoint::SetCondition(const char *condition) {
287  if (condition == nullptr || condition[0] == '\0') {
288  if (m_condition_up)
289  m_condition_up.reset();
290  } else {
291  // Pass nullptr for expr_prefix (no translation-unit level definitions).
292  Status error;
294  condition, llvm::StringRef(), lldb::eLanguageTypeUnknown,
296  error));
297  if (error.Fail()) {
298  // FIXME: Log something...
299  m_condition_up.reset();
300  }
301  }
302  SendWatchpointChangedEvent(eWatchpointEventTypeConditionChanged);
303 }
304 
305 const char *Watchpoint::GetConditionText() const {
306  if (m_condition_up)
307  return m_condition_up->GetUserText();
308  else
309  return nullptr;
310 }
311 
313  lldb::WatchpointEventType eventKind) {
314  if (!m_being_created &&
315  GetTarget().EventTypeHasListeners(
317  WatchpointEventData *data =
318  new Watchpoint::WatchpointEventData(eventKind, shared_from_this());
320  }
321 }
322 
324  if (data == nullptr)
325  return;
326 
327  if (!m_being_created &&
328  GetTarget().EventTypeHasListeners(Target::eBroadcastBitWatchpointChanged))
330  else
331  delete data;
332 }
333 
335  WatchpointEventType sub_type, const WatchpointSP &new_watchpoint_sp)
336  : m_watchpoint_event(sub_type), m_new_watchpoint_sp(new_watchpoint_sp) {}
337 
339 
341  static ConstString g_flavor("Watchpoint::WatchpointEventData");
342  return g_flavor;
343 }
344 
347 }
348 
350  return m_new_watchpoint_sp;
351 }
352 
353 WatchpointEventType
355  return m_watchpoint_event;
356 }
357 
359 
362  if (event) {
363  const EventData *event_data = event->GetData();
364  if (event_data &&
366  return static_cast<const WatchpointEventData *>(event->GetData());
367  }
368  return nullptr;
369 }
370 
371 WatchpointEventType
373  const EventSP &event_sp) {
374  const WatchpointEventData *data = GetEventDataFromEvent(event_sp.get());
375 
376  if (data == nullptr)
377  return eWatchpointEventTypeInvalidType;
378  else
379  return data->GetWatchpointEventType();
380 }
381 
383  const EventSP &event_sp) {
384  WatchpointSP wp_sp;
385 
386  const WatchpointEventData *data = GetEventDataFromEvent(event_sp.get());
387  if (data)
388  wp_sp = data->m_new_watchpoint_sp;
389 
390  return wp_sp;
391 }
lldb_private::Watchpoint::m_options
WatchpointOptions m_options
Definition: Watchpoint.h:197
lldb_private::StoppointSite::GetLoadAddress
virtual lldb::addr_t GetLoadAddress() const
Definition: StoppointSite.h:27
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
LLDB_WATCH_TYPE_WRITE
#define LLDB_WATCH_TYPE_WRITE
Definition: lldb-defines.h:46
lldb_private::Watchpoint::WatchpointEventData::GetFlavorString
static ConstString GetFlavorString()
Definition: Watchpoint.cpp:340
lldb_private::EventData::GetFlavor
virtual ConstString GetFlavor() const =0
lldb_private::StoppointCallbackContext
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
Definition: StoppointCallbackContext.h:26
lldb_private::Event
Definition: Event.h:182
lldb_private::Watchpoint::TurnOffEphemeralMode
void TurnOffEphemeralMode()
Definition: Watchpoint.cpp:231
lldb_private::Watchpoint::IsWatchVariable
bool IsWatchVariable() const
Definition: Watchpoint.cpp:104
lldb_private::WatchpointOptions::GetCallbackDescription
void GetCallbackDescription(Stream *s, lldb::DescriptionLevel level) const
Get description for callback only.
Definition: WatchpointOptions.cpp:118
LLDB_WATCH_TYPE_READ
#define LLDB_WATCH_TYPE_READ
Definition: lldb-defines.h:45
lldb_private::Watchpoint::GetConditionText
const char * GetConditionText() const
Return a pointer to the text of the condition expression.
Definition: Watchpoint.cpp:305
lldb_private::StoppointHitCounter::Reset
void Reset()
Definition: StoppointHitCounter.h:34
lldb_private::Watchpoint::IsHardware
bool IsHardware() const override
Definition: Watchpoint.cpp:99
lldb_private::Watchpoint::WatchpointEventData::GetWatchpointFromEvent
static lldb::WatchpointSP GetWatchpointFromEvent(const lldb::EventSP &event_sp)
Definition: Watchpoint.cpp:382
lldb_private::Watchpoint::IncrementFalseAlarmsAndReviseHitCount
void IncrementFalseAlarmsAndReviseHitCount()
Definition: Watchpoint.cpp:127
lldb_private::Watchpoint::m_watch_write
uint32_t m_watch_write
Definition: Watchpoint.h:183
lldb_private::Watchpoint::m_target
Target & m_target
Definition: Watchpoint.h:169
lldb_private::Watchpoint::ClearCallback
void ClearCallback()
Definition: Watchpoint.cpp:86
lldb_private::WatchpointOptions::SetCallback
void SetCallback(WatchpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous=false)
Adds a callback to the watchpoint option set.
Definition: WatchpointOptions.cpp:69
lldb_private::EventData
Definition: Event.h:36
lldb_private::Watchpoint::m_ignore_count
uint32_t m_ignore_count
Definition: Watchpoint.h:187
lldb_private::EvaluateExpressionOptions
Definition: Target.h:277
StoppointCallbackContext.h
lldb_private::Watchpoint::SetWatchpointType
void SetWatchpointType(uint32_t type, bool notify=true)
Definition: Watchpoint.cpp:259
lldb_private::WatchpointOptions::InvokeCallback
bool InvokeCallback(StoppointCallbackContext *context, lldb::user_id_t watch_id)
Use this function to invoke the callback for a specific stop.
Definition: WatchpointOptions.cpp:89
lldb_private::Watchpoint::SetWatchSpec
void SetWatchSpec(const std::string &str)
Definition: Watchpoint.cpp:95
lldb_private::Watchpoint::InvokeCallback
bool InvokeCallback(StoppointCallbackContext *context)
Invoke the callback action when the watchpoint is hit.
Definition: Watchpoint.cpp:282
UserExpression.h
lldb_private::ValueObjectMemory::Create
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, llvm::StringRef name, const Address &address, lldb::TypeSP &type_sp)
Definition: ValueObjectMemory.cpp:31
lldb_private::Watchpoint::~Watchpoint
~Watchpoint() override
lldb::eLanguageTypeC
@ eLanguageTypeC
Non-standardized C, such as K&R.
Definition: lldb-enumerations.h:443
ValueObjectMemory.h
lldb_private::Watchpoint::m_old_value_sp
lldb::ValueObjectSP m_old_value_sp
Definition: Watchpoint.h:191
lldb_private::Stream
Definition: Stream.h:28
lldb_private::StoppointSite::GetID
lldb::break_id_t GetID() const
Definition: StoppointSite.h:49
lldb_private::StoppointSite::GetHitCount
uint32_t GetHitCount() const
Definition: StoppointSite.h:33
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::Watchpoint::WatchpointEventData::GetFlavor
ConstString GetFlavor() const override
Definition: Watchpoint.cpp:345
lldb_private::Watchpoint::ShouldStop
bool ShouldStop(StoppointCallbackContext *context) override
Definition: Watchpoint.cpp:143
lldb_private::StoppointSite::SetHardwareIndex
void SetHardwareIndex(uint32_t index)
Definition: StoppointSite.h:43
lldb_private::Target
Definition: Target.h:469
lldb_private::Watchpoint::SetDeclInfo
void SetDeclInfo(const std::string &str)
Definition: Watchpoint.cpp:91
lldb_private::StoppointHitCounter::GetValue
uint32_t GetValue() const
Definition: StoppointHitCounter.h:22
Process.h
lldb_private::Watchpoint::WatchpointEventData::~WatchpointEventData
~WatchpointEventData() override
lldb_private::Watchpoint::SetEnabled
void SetEnabled(bool enabled, bool notify=true)
Definition: Watchpoint.cpp:241
lldb_private::Watchpoint::m_type
CompilerType m_type
Definition: Watchpoint.h:193
lldb_private::Watchpoint::DumpWithLevel
void DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) const
Definition: Watchpoint.cpp:188
Target.h
lldb_private::Watchpoint::IsEnabled
bool IsEnabled() const
Definition: Watchpoint.cpp:222
lldb_private::Watchpoint::GetTarget
Target & GetTarget()
Definition: Watchpoint.h:97
lldb_private::StoppointHitCounter::Increment
void Increment(uint32_t difference=1)
Definition: StoppointHitCounter.h:24
lldb_private::Watchpoint::m_disabled_count
uint32_t m_disabled_count
Definition: Watchpoint.h:177
lldb_private::Watchpoint::m_watch_read
uint32_t m_watch_read
Definition: Watchpoint.h:182
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::Watchpoint::m_condition_up
std::unique_ptr< UserExpression > m_condition_up
Definition: Watchpoint.h:201
lldb_private::Watchpoint::GetWatchSpec
std::string GetWatchSpec()
Definition: Watchpoint.cpp:93
lldb_private::Watchpoint::m_is_ephemeral
bool m_is_ephemeral
Definition: Watchpoint.h:173
lldb_private::Watchpoint::DumpSnapshots
void DumpSnapshots(Stream *s, const char *prefix=nullptr) const
Definition: Watchpoint.cpp:159
Watchpoint.h
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:201
lldb_private::Watchpoint::IsDisabledDuringEphemeralMode
bool IsDisabledDuringEphemeralMode()
Definition: Watchpoint.cpp:237
Log.h
ThreadSpec.h
lldb_private::StoppointSite::HardwareRequired
bool HardwareRequired() const
Definition: StoppointSite.h:37
lldb_private::Watchpoint::SetIgnoreCount
void SetIgnoreCount(uint32_t n)
Definition: Watchpoint.cpp:275
lldb_private::StoppointHitCounter::Decrement
void Decrement(uint32_t difference=1)
Definition: StoppointHitCounter.h:29
lldb_private::Watchpoint::SendWatchpointChangedEvent
void SendWatchpointChangedEvent(lldb::WatchpointEventType eventKind)
Definition: Watchpoint.cpp:312
lldb_private::Watchpoint::m_is_watch_variable
bool m_is_watch_variable
Definition: Watchpoint.h:172
lldb_private::LLDBLog::Watchpoints
@ Watchpoints
lldb_private::Watchpoint::m_is_hardware
bool m_is_hardware
Definition: Watchpoint.h:171
lldb::eEncodingUint
@ eEncodingUint
unsigned integer
Definition: lldb-enumerations.h:149
lldb_private::ConstString
Definition: ConstString.h:39
lldb::eDescriptionLevelFull
@ eDescriptionLevelFull
Definition: lldb-enumerations.h:210
lldb_private::Watchpoint::WatchpointRead
bool WatchpointRead() const
Definition: Watchpoint.cpp:269
lldb_private::Watchpoint::m_decl_str
std::string m_decl_str
Definition: Watchpoint.h:189
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::Watchpoint::m_new_value_sp
lldb::ValueObjectSP m_new_value_sp
Definition: Watchpoint.h:192
lldb_private::StoppointSite::m_byte_size
uint32_t m_byte_size
The size in bytes of stoppoint, e.g.
Definition: StoppointSite.h:68
TypeSystem.h
lldb_private::CompilerType::IsValid
bool IsValid() const
Definition: CompilerType.h:123
lldb_private::Watchpoint::TurnOnEphemeralMode
void TurnOnEphemeralMode()
Definition: Watchpoint.cpp:229
lldb_private::Watchpoint::m_watch_spec_str
std::string m_watch_spec_str
Definition: Watchpoint.h:190
ValueObject.h
lldb_private::Watchpoint::CaptureWatchedValue
bool CaptureWatchedValue(const ExecutionContext &exe_ctx)
Definition: Watchpoint.cpp:108
lldb_private::Watchpoint::SetCondition
void SetCondition(const char *condition)
Set the watchpoint's condition.
Definition: Watchpoint.cpp:286
lldb_private::StoppointSite::GetHardwareIndex
uint32_t GetHardwareIndex() const
Definition: StoppointSite.h:41
lldb_private::Target::GetProcessSP
const lldb::ProcessSP & GetProcessSP() const
Definition: Target.cpp:219
lldbassert
#define lldbassert(x)
Definition: LLDBAssert.h:15
lldb_private::Broadcaster::BroadcastEvent
void BroadcastEvent(lldb::EventSP &event_sp)
Broadcast an event which has no associated data.
Definition: Broadcaster.h:262
lldb_private::Watchpoint::WatchpointEventData::GetWatchpoint
lldb::WatchpointSP & GetWatchpoint()
Definition: Watchpoint.cpp:349
lldb_private::Status
Definition: Status.h:44
lldb_private::Target::GetScratchTypeSystemForLanguage
llvm::Expected< lldb::TypeSystemSP > GetScratchTypeSystemForLanguage(lldb::LanguageType language, bool create_on_demand=true)
Definition: Target.cpp:2333
lldb_private::Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent
static lldb::WatchpointEventType GetWatchpointEventTypeFromEvent(const lldb::EventSP &event_sp)
Definition: Watchpoint.cpp:372
uint32_t
lldb_private::Watchpoint::WatchpointEventData::GetEventDataFromEvent
static const WatchpointEventData * GetEventDataFromEvent(const Event *event_sp)
Definition: Watchpoint.cpp:361
lldb_private::ExecutionContext::GetBestExecutionContextScope
ExecutionContextScope * GetBestExecutionContextScope() const
Definition: ExecutionContext.cpp:214
lldb_private::Target::eBroadcastBitWatchpointChanged
@ eBroadcastBitWatchpointChanged
Definition: Target.h:483
lldb_private::Address
Definition: Address.h:59
lldb_private::Watchpoint::m_false_alarms
uint32_t m_false_alarms
Definition: Watchpoint.h:188
lldb_private::Watchpoint::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level)
Definition: Watchpoint.cpp:149
lldb_private::Watchpoint::WatchpointEventData::m_new_watchpoint_sp
lldb::WatchpointSP m_new_watchpoint_sp
Definition: Watchpoint.h:55
lldb_private::Watchpoint::Dump
void Dump(Stream *s) const override
Definition: Watchpoint.cpp:153
lldb_private::Watchpoint::SetWatchVariable
void SetWatchVariable(bool val)
Definition: Watchpoint.cpp:106
lldb_private::Expression::eResultTypeAny
@ eResultTypeAny
Definition: Expression.h:35
lldb_private::StoppointSite::m_hit_counter
StoppointHitCounter m_hit_counter
Number of times this breakpoint/watchpoint has been hit.
Definition: StoppointSite.h:71
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:35
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::Target::GetUserExpressionForLanguage
UserExpression * GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj, Status &error)
Definition: Target.cpp:2417
lldb_private::WatchpointOptions::ClearCallback
void ClearCallback()
Remove the callback from this option set.
Definition: WatchpointOptions.cpp:77
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb::eDescriptionLevelVerbose
@ eDescriptionLevelVerbose
Definition: lldb-enumerations.h:211
lldb_private::Watchpoint::WatchpointEventData::GetWatchpointEventType
lldb::WatchpointEventType GetWatchpointEventType() const
Definition: Watchpoint.cpp:354
lldb_private::Watchpoint::GetIgnoreCount
uint32_t GetIgnoreCount() const
Definition: Watchpoint.cpp:273
lldb_private::Watchpoint::m_enabled
bool m_enabled
Definition: Watchpoint.h:170
LLDB_INVALID_INDEX32
#define LLDB_INVALID_INDEX32
Definition: lldb-defines.h:75
Stream.h
lldb_private::Watchpoint::WatchpointEventData::WatchpointEventData
WatchpointEventData(lldb::WatchpointEventType sub_type, const lldb::WatchpointSP &new_watchpoint_sp)
lldb_private::GetLog
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:309
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:441
lldb
Definition: SBAddress.h:15
lldb_private::Watchpoint::m_being_created
bool m_being_created
Definition: Watchpoint.h:199
LLDB_LOG_ERROR
#define LLDB_LOG_ERROR(log, error,...)
Definition: Log.h:360
Value.h
lldb_private::Watchpoint::SetCallback
void SetCallback(WatchpointHitCallback callback, void *callback_baton, bool is_synchronous=false)
Set the callback action invoked when the watchpoint is hit.
Definition: Watchpoint.cpp:67
LLDBLog.h
lldb_private::Watchpoint::WatchpointWrite
bool WatchpointWrite() const
Definition: Watchpoint.cpp:271
lldb::eDescriptionLevelBrief
@ eDescriptionLevelBrief
Definition: lldb-enumerations.h:209
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:208
lldb_private::StoppointSite
Definition: StoppointSite.h:18
lldb_private::Watchpoint::WatchpointEventData
Definition: Watchpoint.h:27
lldb_private::Watchpoint::WatchpointEventData::Dump
void Dump(Stream *s) const override
Definition: Watchpoint.cpp:358