[Lldb-commits] [PATCH] D25057: Fix ARM/AArch64 Step-Over watchpoint issue remove provision for duplicate watchpoints

Muhammad Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 3 22:17:36 PDT 2016


omjavaid added a comment.

@labath Referring to your email on the mailing list.

Thanks for helping out with this work.

I think we should push this fix, as you suggested this does not fix everything in a holistic way but it corrects the functionality that is currently available right now with limitations ofcourse.

So here is functionality we are currently lacking:

- Ability to put multiple watchpoints with same address range.

This is more concerning because we cannot put a watch on say byte 0 and byte 7 in case of aarch64.

- Ability to use single slot for multiple watchpoints.

This is more like a nice to have and I think if we fix the above functionality this may well be fixed automatically.

This is what I think LLDB client or server has to do:

- Keep a cache of watchpoint registers available and modify registers in cache when a set/remove request is made.
- As pre-req for set/remove is to have the target in stopped state this will mean that when we set/remove we make changes to actual registers before we resume for continue or stepping.
- I dont think keeping the cache and then updating on resume actually means we are lying to client. Cache will also remain limited and will behave like an actual write to the registers. It will serve us well to support the functionality we intend to support.

In case of GDB this functionality is handled by gdbserver and gdb client is not aware of the fact that watchpoint registers are not actually written until we resume.

To implement this in LLDB client or server is a design decision and I just see that it should be easier to achieve on LLDB server side though it may require changes to the way we approach watchpoint for all targets but it will then remain restricted to the concerning target specific area.

I am OOO till 16th If you are OK with this  change I will push it whenever it gets a LGTM.


https://reviews.llvm.org/D25057





More information about the lldb-commits mailing list