Package winappdbg :: Module breakpoint :: Class _BufferWatchCondition
[hide private]
[frames] | no frames]

Class _BufferWatchCondition

source code


Used by Debug.watch_buffer.

This class acts as a condition callback for page breakpoints. It emulates page breakpoints that can overlap and/or take up less than a page's size.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add(self, bw)
Adds a buffer watch identifier.
source code
 
remove(self, bw)
Removes a buffer watch identifier.
source code
int
remove_last_match(self, address, size)
Removes the last buffer from the watch object to match the given address and size.
source code
int
count(self)
Returns: Number of buffers being watched.
source code
bool
__call__(self, event)
Breakpoint condition callback.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

add(self, bw)

source code 

Adds a buffer watch identifier.

Parameters:

remove(self, bw)

source code 

Removes a buffer watch identifier.

Parameters:
Raises:
  • KeyError - The buffer watch identifier was already removed.

remove_last_match(self, address, size)

source code 

Removes the last buffer from the watch object to match the given address and size.

Parameters:
  • address (int) - Memory address of buffer to stop watching.
  • size (int) - Size in bytes of buffer to stop watching.
Returns: int
Number of matching elements found. Only the last one to be added is actually deleted upon calling this method.

This counter allows you to know if there are more matching elements and how many.

count(self)

source code 
Returns: int
Number of buffers being watched.

__call__(self, event)
(Call operator)

source code 

Breakpoint condition callback.

This method will also call the action callbacks for each buffer being watched.

Parameters:
Returns: bool
True if the address being accessed belongs to at least one of the buffers that was being watched and had no action callback.