Last 3bits of the watchpoint address are masked by the kernel. For example, 'n' is at 0x120010d00 and 'm' is 0x120010d04. When a watchpoint is set at 'm', then watch exception is generated even when 'n' is read/written. To handle this case, instruction at PC is emulated to find the base address of the load/store instruction. This address is then appended to the description of the stop-info packet. Client then reads this information to check whether the user has set a watchpoint on this address.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This looks fine. Please add a comment to the declaration of GetWatchpointHitAddress. The meaning is really only explained in StopInfo.cpp, and I don't think the name is clear enough (we would say the watchpoint was NOT hit if the WatchpointHitAddress didn't equal the set address) to stand without some clarification. Other than that it looks good.