Page MenuHomePhabricator

[MIPS] Handle false positives for MIPS hardware watchpoints

Authored by jaydeep on Jul 30 2015, 8:39 PM.



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


Event Timeline

jaydeep updated this revision to Diff 31103.Jul 30 2015, 8:39 PM
jaydeep retitled this revision from to [MIPS] Handle false positives for MIPS hardware watchpoints.
jaydeep updated this object.
jaydeep added a reviewer: clayborg.
jaydeep set the repository for this revision to rL LLVM.
jaydeep added subscribers: lldb-commits, bhushan, slthakur and 2 others.
jingham requested changes to this revision.Aug 3 2015, 11:36 AM
jingham edited edge metadata.

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.

This revision now requires changes to proceed.Aug 3 2015, 11:36 AM
jaydeep updated this revision to Diff 31295.Aug 3 2015, 9:00 PM
jaydeep edited edge metadata.

Addressed review comments

Could you please find some time to review this?

clayborg accepted this revision.Aug 11 2015, 9:46 AM
clayborg edited edge metadata.

Looks fine.

Hi jingham,
Could you please review this?

jingham accepted this revision.Aug 12 2015, 10:33 AM
jingham edited edge metadata.

Yes, this looks fine.

This revision is now accepted and ready to land.Aug 12 2015, 10:33 AM
jaydeep closed this revision.Aug 13 2015, 10:07 PM

Closed by commit rL244864