xref: /freebsd-src/contrib/llvm-project/lldb/bindings/interface/SBWatchpointExtensions.i (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
106c3fb27SDimitry Andric STRING_EXTENSION_LEVEL_OUTSIDE(SBWatchpoint, lldb::eDescriptionLevelVerbose)
2*5f757f3fSDimitry Andric 
3*5f757f3fSDimitry Andric %extend lldb::SBWatchpoint {
4*5f757f3fSDimitry Andric #ifdef SWIGPYTHON
5*5f757f3fSDimitry Andric     %pythoncode%{
6*5f757f3fSDimitry Andric       # operator== is a free function, which swig does not handle, so we inject
7*5f757f3fSDimitry Andric       # our own equality operator here
8*5f757f3fSDimitry Andric       def __eq__(self, other):
9*5f757f3fSDimitry Andric         return not self.__ne__(other)
10*5f757f3fSDimitry Andric 
11*5f757f3fSDimitry Andric       def __hex__(self):
12*5f757f3fSDimitry Andric         return self.GetWatchAddress()
13*5f757f3fSDimitry Andric 
14*5f757f3fSDimitry Andric       def __len__(self):
15*5f757f3fSDimitry Andric         return self.GetWatchSize()
16*5f757f3fSDimitry Andric     %}
17*5f757f3fSDimitry Andric #endif
18*5f757f3fSDimitry Andric }
19