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  m_type = type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
47  eEncodingUint, 8 * size);
48  }
49  }
50 
51  // Set the initial value of the watched variable:
52  if (m_target.GetProcessSP()) {
53  ExecutionContext exe_ctx;
54  m_target.GetProcessSP()->CalculateExecutionContext(exe_ctx);
55  CaptureWatchedValue(exe_ctx);
56  }
57  m_being_created = false;
58 }
59 
60 Watchpoint::~Watchpoint() = default;
61 
62 // This function is used when "baton" doesn't need to be freed
63 void Watchpoint::SetCallback(WatchpointHitCallback callback, void *baton,
64  bool is_synchronous) {
65  // The default "Baton" class will keep a copy of "baton" and won't free or
66  // delete it when it goes goes out of scope.
67  m_options.SetCallback(callback, std::make_shared<UntypedBaton>(baton),
68  is_synchronous);
69 
70  SendWatchpointChangedEvent(eWatchpointEventTypeCommandChanged);
71 }
72 
73 // This function is used when a baton needs to be freed and therefore is
74 // contained in a "Baton" subclass.
75 void Watchpoint::SetCallback(WatchpointHitCallback callback,
76  const BatonSP &callback_baton_sp,
77  bool is_synchronous) {
78  m_options.SetCallback(callback, callback_baton_sp, is_synchronous);
79  SendWatchpointChangedEvent(eWatchpointEventTypeCommandChanged);
80 }
81 
84  SendWatchpointChangedEvent(eWatchpointEventTypeCommandChanged);
85 }
86 
87 void Watchpoint::SetDeclInfo(const std::string &str) { m_decl_str = str; }
88 
90 
92  m_watch_spec_str = str;
93 }
94 
95 bool Watchpoint::IsHardware() const {
97  return m_is_hardware;
98 }
99 
101 
103 
105  ConstString watch_name("$__lldb__watch_value");
107  Address watch_address(GetLoadAddress());
108  if (!m_type.IsValid()) {
109  // Don't know how to report new & old values, since we couldn't make a
110  // scalar type for this watchpoint. This works around an assert in
111  // ValueObjectMemory::Create.
112  // FIXME: This should not happen, but if it does in some case we care about,
113  // we can go grab the value raw and print it as unsigned.
114  return false;
115  }
117  exe_ctx.GetBestExecutionContextScope(), watch_name.GetStringRef(),
118  watch_address, m_type);
119  m_new_value_sp = m_new_value_sp->CreateConstantValue(watch_name);
120  return (m_new_value_sp && m_new_value_sp->GetError().Success());
121 }
122 
124  ++m_false_alarms;
125  if (m_false_alarms) {
128  m_false_alarms = 0;
129  } else {
132  }
133  }
134 }
135 
136 // RETURNS - true if we should stop at this breakpoint, false if we
137 // should continue.
138 
141 
142  return IsEnabled();
143 }
144 
146  DumpWithLevel(s, level);
147 }
148 
149 void Watchpoint::Dump(Stream *s) const {
151 }
152 
153 // If prefix is nullptr, we display the watch id and ignore the prefix
154 // altogether.
155 void Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const {
156  if (!prefix) {
157  s->Printf("\nWatchpoint %u hit:", GetID());
158  prefix = "";
159  }
160 
161  if (m_old_value_sp) {
162  const char *old_value_cstr = m_old_value_sp->GetValueAsCString();
163  if (old_value_cstr && old_value_cstr[0])
164  s->Printf("\n%sold value: %s", prefix, old_value_cstr);
165  else {
166  const char *old_summary_cstr = m_old_value_sp->GetSummaryAsCString();
167  if (old_summary_cstr && old_summary_cstr[0])
168  s->Printf("\n%sold value: %s", prefix, old_summary_cstr);
169  }
170  }
171 
172  if (m_new_value_sp) {
173  const char *new_value_cstr = m_new_value_sp->GetValueAsCString();
174  if (new_value_cstr && new_value_cstr[0])
175  s->Printf("\n%snew value: %s", prefix, new_value_cstr);
176  else {
177  const char *new_summary_cstr = m_new_value_sp->GetSummaryAsCString();
178  if (new_summary_cstr && new_summary_cstr[0])
179  s->Printf("\n%snew value: %s", prefix, new_summary_cstr);
180  }
181  }
182 }
183 
185  lldb::DescriptionLevel description_level) const {
186  if (s == nullptr)
187  return;
188 
189  assert(description_level >= lldb::eDescriptionLevelBrief &&
190  description_level <= lldb::eDescriptionLevelVerbose);
191 
192  s->Printf("Watchpoint %u: addr = 0x%8.8" PRIx64
193  " size = %u state = %s type = %s%s",
195  IsEnabled() ? "enabled" : "disabled", m_watch_read ? "r" : "",
196  m_watch_write ? "w" : "");
197 
198  if (description_level >= lldb::eDescriptionLevelFull) {
199  if (!m_decl_str.empty())
200  s->Printf("\n declare @ '%s'", m_decl_str.c_str());
201  if (!m_watch_spec_str.empty())
202  s->Printf("\n watchpoint spec = '%s'", m_watch_spec_str.c_str());
203 
204  // Dump the snapshots we have taken.
205  DumpSnapshots(s, " ");
206 
207  if (GetConditionText())
208  s->Printf("\n condition = '%s'", GetConditionText());
209  m_options.GetCallbackDescription(s, description_level);
210  }
211 
212  if (description_level >= lldb::eDescriptionLevelVerbose) {
213  s->Printf("\n hw_index = %i hit_count = %-4u ignore_count = %-4u",
215  }
216 }
217 
218 bool Watchpoint::IsEnabled() const { return m_enabled; }
219 
220 // Within StopInfo.cpp, we purposely turn on the ephemeral mode right before
221 // temporarily disable the watchpoint in order to perform possible watchpoint
222 // actions without triggering further watchpoint events. After the temporary
223 // disabled watchpoint is enabled, we then turn off the ephemeral mode.
224 
226 
228  m_is_ephemeral = false;
229  // Leaving ephemeral mode, reset the m_disabled_count!
230  m_disabled_count = 0;
231 }
232 
234  return m_disabled_count > 1 && m_is_ephemeral;
235 }
236 
237 void Watchpoint::SetEnabled(bool enabled, bool notify) {
238  if (!enabled) {
239  if (!m_is_ephemeral)
241  else
243 
244  // Don't clear the snapshots for now.
245  // Within StopInfo.cpp, we purposely do disable/enable watchpoint while
246  // performing watchpoint actions.
247  }
248  bool changed = enabled != m_enabled;
249  m_enabled = enabled;
250  if (notify && !m_is_ephemeral && changed)
251  SendWatchpointChangedEvent(enabled ? eWatchpointEventTypeEnabled
252  : eWatchpointEventTypeDisabled);
253 }
254 
255 void Watchpoint::SetWatchpointType(uint32_t type, bool notify) {
256  int old_watch_read = m_watch_read;
257  int old_watch_write = m_watch_write;
258  m_watch_read = (type & LLDB_WATCH_TYPE_READ) != 0;
259  m_watch_write = (type & LLDB_WATCH_TYPE_WRITE) != 0;
260  if (notify &&
261  (old_watch_read != m_watch_read || old_watch_write != m_watch_write))
262  SendWatchpointChangedEvent(eWatchpointEventTypeTypeChanged);
263 }
264 
265 bool Watchpoint::WatchpointRead() const { return m_watch_read != 0; }
266 
267 bool Watchpoint::WatchpointWrite() const { return m_watch_write != 0; }
268 
270 
272  bool changed = m_ignore_count != n;
273  m_ignore_count = n;
274  if (changed)
275  SendWatchpointChangedEvent(eWatchpointEventTypeIgnoreChanged);
276 }
277 
279  return m_options.InvokeCallback(context, GetID());
280 }
281 
282 void Watchpoint::SetCondition(const char *condition) {
283  if (condition == nullptr || condition[0] == '\0') {
284  if (m_condition_up)
285  m_condition_up.reset();
286  } else {
287  // Pass nullptr for expr_prefix (no translation-unit level definitions).
288  Status error;
290  condition, llvm::StringRef(), lldb::eLanguageTypeUnknown,
292  error));
293  if (error.Fail()) {
294  // FIXME: Log something...
295  m_condition_up.reset();
296  }
297  }
298  SendWatchpointChangedEvent(eWatchpointEventTypeConditionChanged);
299 }
300 
301 const char *Watchpoint::GetConditionText() const {
302  if (m_condition_up)
303  return m_condition_up->GetUserText();
304  else
305  return nullptr;
306 }
307 
309  lldb::WatchpointEventType eventKind) {
310  if (!m_being_created &&
311  GetTarget().EventTypeHasListeners(
313  WatchpointEventData *data =
314  new Watchpoint::WatchpointEventData(eventKind, shared_from_this());
316  }
317 }
318 
320  if (data == nullptr)
321  return;
322 
323  if (!m_being_created &&
324  GetTarget().EventTypeHasListeners(Target::eBroadcastBitWatchpointChanged))
326  else
327  delete data;
328 }
329 
331  WatchpointEventType sub_type, const WatchpointSP &new_watchpoint_sp)
332  : m_watchpoint_event(sub_type), m_new_watchpoint_sp(new_watchpoint_sp) {}
333 
335 
337  static ConstString g_flavor("Watchpoint::WatchpointEventData");
338  return g_flavor;
339 }
340 
343 }
344 
346  return m_new_watchpoint_sp;
347 }
348 
349 WatchpointEventType
351  return m_watchpoint_event;
352 }
353 
355 
358  if (event) {
359  const EventData *event_data = event->GetData();
360  if (event_data &&
362  return static_cast<const WatchpointEventData *>(event->GetData());
363  }
364  return nullptr;
365 }
366 
367 WatchpointEventType
369  const EventSP &event_sp) {
370  const WatchpointEventData *data = GetEventDataFromEvent(event_sp.get());
371 
372  if (data == nullptr)
373  return eWatchpointEventTypeInvalidType;
374  else
375  return data->GetWatchpointEventType();
376 }
377 
379  const EventSP &event_sp) {
380  WatchpointSP wp_sp;
381 
382  const WatchpointEventData *data = GetEventDataFromEvent(event_sp.get());
383  if (data)
384  wp_sp = data->m_new_watchpoint_sp;
385 
386  return wp_sp;
387 }
lldb_private::Watchpoint::m_options
WatchpointOptions m_options
Definition: Watchpoint.h:194
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:336
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:227
lldb_private::Watchpoint::IsWatchVariable
bool IsWatchVariable() const
Definition: Watchpoint.cpp:100
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:301
lldb_private::StoppointHitCounter::Reset
void Reset()
Definition: StoppointHitCounter.h:34
lldb_private::Watchpoint::IsHardware
bool IsHardware() const override
Definition: Watchpoint.cpp:95
lldb_private::Watchpoint::WatchpointEventData::GetWatchpointFromEvent
static lldb::WatchpointSP GetWatchpointFromEvent(const lldb::EventSP &event_sp)
Definition: Watchpoint.cpp:378
lldb_private::Watchpoint::IncrementFalseAlarmsAndReviseHitCount
void IncrementFalseAlarmsAndReviseHitCount()
Definition: Watchpoint.cpp:123
lldb_private::Watchpoint::m_watch_write
uint32_t m_watch_write
Definition: Watchpoint.h:180
lldb_private::Watchpoint::m_target
Target & m_target
Definition: Watchpoint.h:166
lldb_private::Watchpoint::ClearCallback
void ClearCallback()
Definition: Watchpoint.cpp:82
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:184
lldb_private::EvaluateExpressionOptions
Definition: Target.h:281
StoppointCallbackContext.h
lldb_private::Watchpoint::SetWatchpointType
void SetWatchpointType(uint32_t type, bool notify=true)
Definition: Watchpoint.cpp:255
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:91
lldb_private::Target::GetScratchTypeSystemForLanguage
llvm::Expected< TypeSystem & > GetScratchTypeSystemForLanguage(lldb::LanguageType language, bool create_on_demand=true)
Definition: Target.cpp:2287
lldb_private::Watchpoint::InvokeCallback
bool InvokeCallback(StoppointCallbackContext *context)
Invoke the callback action when the watchpoint is hit.
Definition: Watchpoint.cpp:278
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
ValueObjectMemory.h
lldb_private::Watchpoint::m_old_value_sp
lldb::ValueObjectSP m_old_value_sp
Definition: Watchpoint.h:188
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:341
lldb_private::Watchpoint::ShouldStop
bool ShouldStop(StoppointCallbackContext *context) override
Definition: Watchpoint.cpp:139
lldb_private::StoppointSite::SetHardwareIndex
void SetHardwareIndex(uint32_t index)
Definition: StoppointSite.h:43
lldb_private::Target
Definition: Target.h:473
lldb_private::Watchpoint::SetDeclInfo
void SetDeclInfo(const std::string &str)
Definition: Watchpoint.cpp:87
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:237
lldb_private::Watchpoint::m_type
CompilerType m_type
Definition: Watchpoint.h:190
lldb_private::Watchpoint::DumpWithLevel
void DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) const
Definition: Watchpoint.cpp:184
Target.h
lldb_private::Watchpoint::IsEnabled
bool IsEnabled() const
Definition: Watchpoint.cpp:218
lldb_private::Watchpoint::GetTarget
Target & GetTarget()
Definition: Watchpoint.h:97
lldb_private::Target::eBroadcastBitWatchpointChanged
@ eBroadcastBitWatchpointChanged
Definition: Target.h:487
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:174
lldb_private::Watchpoint::m_watch_read
uint32_t m_watch_read
Definition: Watchpoint.h:179
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:198
lldb_private::Watchpoint::GetWatchSpec
std::string GetWatchSpec()
Definition: Watchpoint.cpp:89
lldb_private::Watchpoint::m_is_ephemeral
bool m_is_ephemeral
Definition: Watchpoint.h:170
lldb_private::Watchpoint::DumpSnapshots
void DumpSnapshots(Stream *s, const char *prefix=nullptr) const
Definition: Watchpoint.cpp:155
Watchpoint.h
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:202
lldb_private::Watchpoint::IsDisabledDuringEphemeralMode
bool IsDisabledDuringEphemeralMode()
Definition: Watchpoint.cpp:233
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:271
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:308
lldb_private::Watchpoint::m_is_watch_variable
bool m_is_watch_variable
Definition: Watchpoint.h:169
lldb_private::LLDBLog::Watchpoints
@ Watchpoints
lldb_private::Watchpoint::m_is_hardware
bool m_is_hardware
Definition: Watchpoint.h:168
lldb::eEncodingUint
@ eEncodingUint
unsigned integer
Definition: lldb-enumerations.h:148
lldb_private::ConstString
Definition: ConstString.h:40
lldb::eDescriptionLevelFull
@ eDescriptionLevelFull
Definition: lldb-enumerations.h:209
lldb_private::Watchpoint::WatchpointRead
bool WatchpointRead() const
Definition: Watchpoint.cpp:265
lldb_private::Watchpoint::m_decl_str
std::string m_decl_str
Definition: Watchpoint.h:186
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:189
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:72
lldb_private::Watchpoint::TurnOnEphemeralMode
void TurnOnEphemeralMode()
Definition: Watchpoint.cpp:225
lldb_private::Watchpoint::m_watch_spec_str
std::string m_watch_spec_str
Definition: Watchpoint.h:187
ValueObject.h
lldb_private::Watchpoint::CaptureWatchedValue
bool CaptureWatchedValue(const ExecutionContext &exe_ctx)
Definition: Watchpoint.cpp:104
lldb_private::Watchpoint::SetCondition
void SetCondition(const char *condition)
Set the watchpoint's condition.
Definition: Watchpoint.cpp:282
lldb_private::StoppointSite::GetHardwareIndex
uint32_t GetHardwareIndex() const
Definition: StoppointSite.h:41
lldb_private::Target::GetProcessSP
const lldb::ProcessSP & GetProcessSP() const
Definition: Target.cpp:217
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:345
lldb_private::Status
Definition: Status.h:44
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:437
lldb_private::Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent
static lldb::WatchpointEventType GetWatchpointEventTypeFromEvent(const lldb::EventSP &event_sp)
Definition: Watchpoint.cpp:368
uint32_t
lldb_private::Watchpoint::WatchpointEventData::GetEventDataFromEvent
static const WatchpointEventData * GetEventDataFromEvent(const Event *event_sp)
Definition: Watchpoint.cpp:357
lldb_private::ExecutionContext::GetBestExecutionContextScope
ExecutionContextScope * GetBestExecutionContextScope() const
Definition: ExecutionContext.cpp:214
lldb_private::Address
Definition: Address.h:59
lldb_private::Watchpoint::m_false_alarms
uint32_t m_false_alarms
Definition: Watchpoint.h:185
lldb_private::Watchpoint::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level)
Definition: Watchpoint.cpp:145
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:149
lldb_private::Watchpoint::SetWatchVariable
void SetWatchVariable(bool val)
Definition: Watchpoint.cpp:102
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:33
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:2357
lldb_private::WatchpointOptions::ClearCallback
void ClearCallback()
Remove the callback from this option set.
Definition: WatchpointOptions.cpp:77
lldb::eLanguageTypeC
@ eLanguageTypeC
Non-standardized C, such as K&R.
Definition: lldb-enumerations.h:439
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb::eDescriptionLevelVerbose
@ eDescriptionLevelVerbose
Definition: lldb-enumerations.h:210
lldb_private::Watchpoint::WatchpointEventData::GetWatchpointEventType
lldb::WatchpointEventType GetWatchpointEventType() const
Definition: Watchpoint.cpp:350
lldb_private::Watchpoint::GetIgnoreCount
uint32_t GetIgnoreCount() const
Definition: Watchpoint.cpp:269
lldb_private::Watchpoint::m_enabled
bool m_enabled
Definition: Watchpoint.h:167
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:308
lldb
Definition: SBAddress.h:15
lldb_private::Watchpoint::m_being_created
bool m_being_created
Definition: Watchpoint.h:196
LLDB_LOG_ERROR
#define LLDB_LOG_ERROR(log, error,...)
Definition: Log.h:359
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:63
LLDBLog.h
lldb_private::Watchpoint::WatchpointWrite
bool WatchpointWrite() const
Definition: Watchpoint.cpp:267
lldb::eDescriptionLevelBrief
@ eDescriptionLevelBrief
Definition: lldb-enumerations.h:208
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
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:354