[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
Wed Sep 28 17:26:23 PDT 2016


omjavaid created this revision.
omjavaid added a reviewer: labath.
omjavaid added a subscriber: lldb-commits.
Herald added subscribers: samparker, srhines, danalbert, tberghammer, rengolin, aemerson.

On ARM Linux targets  watchpoints are reported by PTrace before the instruction causing watchpoint to trigger is executed. 
This means we cannot step-over watchpoint causing instruction as long as there is watchpoint installed on that location.
For this reason we cannot have multiple watchpoint slots watching same region word/byte/halfword etc as we have to disable watchpoint for stepping over and only watchpoint index reported by lldb-server is disabled.
Similarly we cannot keep a single hardware watchpoint slot referring to multiple watchpoints in LLDB. This actually means that hware watchpoint indexes are exclusively assigned to a watchpoint and cannot be shared by other watchpoint. Also no other watchpoint should watch same address already watched by any other index.

More discussion on this can be found here:
https://reviews.llvm.org/D24610

This patch fixes issue with stepping over watchpoint by removing the provision to enable multiple watchpoints referring to same hardware watchpoint slot (same HW index). Also we restrict one watchpoint per word aligned address so duplication of address will not be allowed to avoid any step-over failures.

I have also attached a test-case that tests this scenario.

https://reviews.llvm.org/D25057

Files:
  packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/Makefile
  packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
  packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/main.c
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25057.72932.patch
Type: text/x-patch
Size: 16410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160929/0c0966ca/attachment-0001.bin>


More information about the lldb-commits mailing list