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