[Lldb-commits] [PATCH] D89874: [lldb] Unify x86 watchpoint implementation on Linux and NetBSD (and future FreeBSD plugin) [WIP]

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 21 09:59:50 PDT 2020


mgorny updated this revision to Diff 299731.
mgorny added a comment.

Revamped the whole file to hopefully make it a bit less magical.

- Moved all the constants into inline functions and one constexpr var.
- Added more 'visual' comments what bits are touched.
- Added comments about NetBSD-specific hacks.
- Inlined RegisterInfo magic into `GetDR()`.
- Reduced the number of local variables, and renamed reg_value variables to clearly indicate which reg it is.
- Removed duplicate cleaning of DR6 when clearing all hw watchpoints — the cleanup is done on adding new watchpoints anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89874/new/

https://reviews.llvm.org/D89874

Files:
  lldb/include/lldb/lldb-defines.h
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
  lldb/source/Plugins/Process/Utility/CMakeLists.txt
  lldb/source/Plugins/Process/Utility/WatchpointMixin_x86.cpp
  lldb/source/Plugins/Process/Utility/WatchpointMixin_x86.h
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89874.299731.patch
Type: text/x-patch
Size: 26118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201021/390b0255/attachment-0001.bin>


More information about the lldb-commits mailing list