[Lldb-commits] [PATCH] D63792: [lldb] [Process/NetBSD] Use global enable bits for watchpoints

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 1 03:08:57 PDT 2019


mgorny marked an inline comment as done.
mgorny added a comment.

That's probably one of the reasons why NetBSD normally prevents unprivileged users from setting DRs.



================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:733
   // for watchpoints 0, 1, 2, or 3, respectively, set bits 1, 3, 5, or 7
-  uint64_t enable_bit = 1 << (2 * wp_index);
+  uint64_t enable_bit = 2 << (2 * wp_index);
 
----------------
labath wrote:
> Not a big deal, but I'd find `1 << (2*wp_index + 1)` less surprising..
Will do.


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

https://reviews.llvm.org/D63792





More information about the lldb-commits mailing list