mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-21 10:42:35 +00:00

This patch adds the following methods: * `GetType()` * `GetWatchValueKind()` * `GetWatchSpec()` * `IsWatchingReads()` * `IsWatchingWrites()` These mostly expose methods that `lldb_private::Watchpoint` already had. Tests are included that exercise these new methods. The motivation for exposing these are as follows: * `GetType()` - With this information and the address from a watchpoint it is now possible to construct an SBValue from an SBWatchpoint. Previously this wasn't possible. The included test case illustrates doing this. * `GetWatchValueKind()` - This allows the caller to determine whether the watchpoint is a variable watchpoint or an expression watchpoint. A new enum (`WatchpointValueKind`) has been introduced to represent the return values. Unfortunately the name `WatchpointKind` was already taken. * `GetWatchSpec()` - This allows (at least for variable watchpoints) to use a sensible name for SBValues created from an SBWatchpoint. * `IsWatchingReads()` - This allow checking if a watchpoint is monitoring read accesses. * `IsWatchingWRites()` - This allow checking if a watchpoint is monitoring write accesses. rdar://105606978 Reviewers: jingham, mib, bulbazord, jasonmolenda, JDevlieghere Differential Revision: https://reviews.llvm.org/D144937
49 lines
1.8 KiB
OpenEdge ABL
49 lines
1.8 KiB
OpenEdge ABL
%feature("docstring",
|
|
"Represents an instance of watchpoint for a specific target program.
|
|
|
|
A watchpoint is determined by the address and the byte size that resulted in
|
|
this particular instantiation. Each watchpoint has its settable options.
|
|
|
|
See also :py:class:`SBTarget.watchpoint_iter()` for example usage of iterating through the
|
|
watchpoints of the target."
|
|
) lldb::SBWatchpoint;
|
|
|
|
%feature("docstring", "
|
|
With -1 representing an invalid hardware index."
|
|
) lldb::SBWatchpoint::GetHardwareIndex;
|
|
|
|
%feature("docstring", "
|
|
Get the condition expression for the watchpoint."
|
|
) lldb::SBWatchpoint::GetCondition;
|
|
|
|
%feature("docstring", "
|
|
The watchpoint stops only if the condition expression evaluates to true."
|
|
) lldb::SBWatchpoint::SetCondition;
|
|
|
|
%feature("docstring", "
|
|
Returns the type recorded when the watchpoint was created. For variable
|
|
watchpoints it is the type of the watched variable. For expression
|
|
watchpoints it is the type of the provided expression."
|
|
) lldb::SBWatchpoint::GetType;
|
|
|
|
%feature("docstring", "
|
|
Returns the kind of value that was watched when the watchpoint was created.
|
|
Returns one of the following eWatchPointValueKindVariable,
|
|
eWatchPointValueKindExpression, eWatchPointValueKindInvalid.
|
|
"
|
|
) lldb::SBWatchpoint::GetWatchValueKind;
|
|
|
|
%feature("docstring", "
|
|
Get the spec for the watchpoint. For variable watchpoints this is the name
|
|
of the variable. For expression watchpoints it is empty
|
|
(may change in the future)."
|
|
) lldb::SBWatchpoint::GetWatchSpec;
|
|
|
|
%feature("docstring", "
|
|
Returns true if the watchpoint is watching reads. Returns false otherwise."
|
|
) lldb::SBWatchpoint::IsWatchingReads;
|
|
|
|
%feature("docstring", "
|
|
Returns true if the watchpoint is watching writes. Returns false otherwise."
|
|
) lldb::SBWatchpoint::IsWatchingWrites;
|