[Lldb-commits] [PATCH] D38897: Add specific ppc64le hardware watchpoint handler

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 20 08:10:54 PDT 2017


clayborg added inline comments.


================
Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp:284
+  switch (watch_flags) {
+  case write_mode:
+    rw_mode = PPC_BREAKPOINT_TRIGGER_WRITE;
----------------
We should use the lldb::WatchpointKind  from lldb-enumerations.h:

```
//----------------------------------------------------------------------
// Watchpoint Kind
// Indicates what types of events cause the watchpoint to fire.
// Used by Native*Protocol-related classes.
//----------------------------------------------------------------------
FLAGS_ENUM(WatchpointKind){eWatchpointKindRead = (1u << 0),
                           eWatchpointKindWrite = (1u << 1)};
```

The you look at the bits and do the right thing. "access_mode" used below will just be if read and write are set.


https://reviews.llvm.org/D38897





More information about the lldb-commits mailing list