[Lldb-commits] [PATCH] D38897: Add specific ppc64le hardware watchpoint handler
Ana Julia Caetano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 20 12:20:55 PDT 2017
anajuliapc 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;
----------------
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?
https://reviews.llvm.org/D38897
More information about the lldb-commits
mailing list