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; ---------------- anajuliapc wrote: > clayborg wrote: > > 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. > Variable `watch_flags` is set in [[ > https://github.com/llvm-mirror/lldb/blob/master/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp#L2561 > | GDBRemoteCommunicationServerLLGS ]] with `read = 2` and `write = 1`. > Where do you think I should change it? I would switch them over to use eWatchpointKindRead and eWatchpointKindWrite and modify all code that falls out from that to use these definitions as well. https://reviews.llvm.org/D38897 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits