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

Class BufferWatch


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 x.__class__.__doc__ for signature
 
add(self, address, size, action=None)
Adds a buffer to the watch object.
 
remove(self, address, size)
Removes a buffer from the watch object.
bool
exists(self, address, size)
Returns: True if the buffer is being watched, False otherwise.
tuple( int, int )
span(self)
Returns: Base address and size in pages required to watch all the buffers.
int
count(self)
Returns: Number of buffers being watched.
bool
__call__(self, event)
Breakpoint condition callback.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

add(self, address, size, action=None)

 

Adds a buffer to the watch object.

Parameters:
  • address (int) - Memory address of buffer to watch.
  • size (int) - Size in bytes of buffer to watch.
  • action (function) - (Optional) Action callback function.

    See Debug.define_page_breakpoint for more details.

remove(self, address, size)

 

Removes a buffer from the watch object.

Parameters:
  • address (int) - Memory address of buffer to stop watching.
  • size (int) - Size in bytes of buffer to stop watching.

exists(self, address, size)

 
Parameters:
  • address (int) - Memory address of buffer being watched.
  • size (int) - Size in bytes of buffer being watched.
Returns: bool
True if the buffer is being watched, False otherwise.

span(self)

 
Returns: tuple( int, int )
Base address and size in pages required to watch all the buffers.

count(self)

 
Returns: int
Number of buffers being watched.

__call__(self, event)
(Call operator)

 

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.