Skip to content

Commit d6e1ae2

Browse files
committed
Add logging to WatchpointAlgorithm
When verbose lldb watch channel is enabled, print the user requested watchpoint and the resources we've broken it up into.
1 parent 09fc333 commit d6e1ae2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lldb/source/Breakpoint/WatchpointAlgorithms.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include "lldb/Breakpoint/WatchpointResource.h"
1111
#include "lldb/Target/Process.h"
1212
#include "lldb/Utility/ArchSpec.h"
13+
#include "lldb/Utility/LLDBLog.h"
14+
#include "lldb/Utility/Log.h"
1315

1416
#include <utility>
1517
#include <vector>
@@ -41,8 +43,13 @@ WatchpointAlgorithms::AtomizeWatchpointRequest(
4143
/*address_byte_size*/ arch.GetAddressByteSize());
4244
}
4345

46+
Log *log = GetLog(LLDBLog::Watchpoints);
47+
LLDB_LOGV(log, "AtomizeWatchpointRequest user request addr {0:x} size {1}",
48+
addr, size);
4449
std::vector<WatchpointResourceSP> resources;
4550
for (Region &ent : entries) {
51+
LLDB_LOGV(log, "AtomizeWatchpointRequest creating resource {0:x} size {1}",
52+
ent.addr, ent.size);
4653
WatchpointResourceSP wp_res_sp =
4754
std::make_shared<WatchpointResource>(ent.addr, ent.size, read, write);
4855
resources.push_back(wp_res_sp);

0 commit comments

Comments
 (0)