jasonmolenda wrote:
> Does `watch enable` not re-evaluate the variable expression that was passed
> in when the watchpoint was set? I was wondering why you have to require ASLR?
*cough* I forgot how all this works, I had to reread a bit. We don't reevaluate
the watchpoint specification when re-enabling. In the Watchpoint object the
specification is resolved to an address and a size, and the
WatchpointResource(s) for that Watchpoint are based on that addr+size.
When we re-enable a watchpoint, Watchpoint::Enable() is called and then
Process::EnableWatchpoint() is called, which does calculates the Resources
needed to cover the watchpoint, then
```
Status ProcessGDBRemote::EnableWatchpoint(WatchpointSP wp_sp, bool notify) {
for (const auto &wp_res_sp : resources) {
addr_t addr = wp_res_sp->GetLoadAddress();
size_t size = wp_res_sp->GetByteSize();
GDBStoppointType type = GetGDBStoppointType(wp_res_sp);
if (!m_gdb_comm.SupportsGDBStoppointPacket(type) ||
m_gdb_comm.SendGDBStoppointTypePacket(type, true, addr, size,
GetInterruptTimeout())) {
```
all in terms of addr+size from the already-evaluated specification.
https://github.com/llvm/llvm-project/pull/218819
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits