Package vtrace :: Module breakpoints :: Class Breakpoint
[hide private]
[frames] | no frames]

Class Breakpoint

source code

Known Subclasses:

Breakpoints in Vtrace are platform independant objects that use the underlying trace objects to get things like the program counter and the break instruction. As long as platfforms are completely implemented, all breakpoint objects should be portable.

Instance Methods [hide private]
 
__init__(self, address, expression=None) source code
 
__repr__(self) source code
 
activate(self, trace)
Actually store off and replace memory for this process.
source code
 
deactivate(self, trace)
Repair the process for continued execution.
source code
 
getAddress(self)
This will return the address for this breakpoint.
source code
 
getBreakpointCode(self)
Return the current python string that will be run when this break is hit.
source code
 
getId(self) source code
 
getName(self) source code
 
inittrace(self, trace)
A callback to do housekeeping at the time the breakpoint is added to the tracer object.
source code
 
isEnabled(self)
Is this breakpoint "enabled"?
source code
 
notify(self, event, trace)
Breakpoints may also extend and implement "notify" which will be called whenever they are hit.
source code
 
resolveAddress(self, trace)
Try to resolve the address for this break.
source code
 
resolvedaddr(self, trace, addr)
An initialization callback which will be executed when the actual address for this breakpoint has been resolved.
source code
 
setBreakpointCode(self, pystr)
Use this method to set custom python code to run when this breakpoint gets hit.
source code
 
setEnabled(self, enabled=True)
Set this breakpoints "enabled" status
source code
Class Variables [hide private]
  bpcodeobj = {}
Method Details [hide private]

activate(self, trace)

source code 

Actually store off and replace memory for this process. This is caried out by the trace object itself when it begins running or stops. You probably never need to call this (see isEnabled() setEnabled() for boolean enable/disablle)

deactivate(self, trace)

source code 

Repair the process for continued execution. this does NOT make a breakpoint *inactive*, but removes it's "0xcc" from mem (see isEnabled() setEnabled() for boolean enable/dissable)

getAddress(self)

source code 

This will return the address for this breakpoint. If the return'd address is None, this is a deferred breakpoint which needs to have resolveAddress() called to attempt to set the address.

inittrace(self, trace)

source code 

A callback to do housekeeping at the time the breakpoint is added to the tracer object. This should be used instead of activate for initialization time infoz to save on time per activate call...

notify(self, event, trace)

source code 

Breakpoints may also extend and implement "notify" which will be called whenever they are hit. If you want to continue the ability for this breakpoint to have bpcode, you must call this method from your override.

resolveAddress(self, trace)

source code 

Try to resolve the address for this break. If this is a statically addressed break, just return the address. If it has an "expression" use that to resolve the address...

setBreakpointCode(self, pystr)

source code 

Use this method to set custom python code to run when this
breakpoint gets hit.  The code will have the following objects
mapped into it's namespace when run:
    trace - the tracer
    vtrace - the vtrace module
    bp - the breakpoint