Public Member Functions

com.google.security.zynamics.binnavi.API.debug.Debugger Class Reference

Inherits com::google::security::zynamics::binnavi::APIHelpers::ApiObject< IDebugger >.

List of all members.

Public Member Functions

void addListener (final IDebuggerListener listener)
void cancelTargetSelection () throws DebugException
void connect () throws DebugException
void detach () throws DebugException
BookmarkManager getBookmarkManager ()
BreakpointManager getBreakpointManager ()
Process getProcess ()
boolean isConnected ()
void readMemory (final Address address, final int size) throws DebugException
void readRegisters () throws DebugException
void removeListener (final IDebuggerListener listener)
void requestFileSystem (final String path) throws DebugException
void requestFileSystem () throws DebugException
void resume () throws DebugException
void selectFile (final String file) throws DebugException
void singleStep () throws DebugException
void terminate () throws DebugException
Address toFilebase (final Module module, final Address address)
Address toImagebase (final Module module, final Address address)
String toString ()
void writeMemory (final Address address, final byte[] data) throws DebugException
void writeRegister (final long tid, final String register, final long value) throws DebugException

Detailed Description

Debugger object that can be used to debug modules or projects.


Member Function Documentation

void com.google.security.zynamics.binnavi.API.debug.Debugger.addListener ( final IDebuggerListener  listener  ) 

Adds a debugger listener object that is notified about incoming debug messages and changes in the debugger state.

Note that this function adds very low-level listeners. If possible you should use higher-level listeners like IThreadListener or IProcessListener.

Parameters:
listener The listener object to add.
void com.google.security.zynamics.binnavi.API.debug.Debugger.cancelTargetSelection (  )  throws DebugException

Cancels the target selection of the debugger and closes the connection.

Exceptions:
DebugException Thrown if an error occurred during cancellation.
void com.google.security.zynamics.binnavi.API.debug.Debugger.connect (  )  throws DebugException

Connects to the target process.

Exceptions:
DebugException Thrown if the debugger could not connect to the target process.
void com.google.security.zynamics.binnavi.API.debug.Debugger.detach (  )  throws DebugException

Detaches from the target process.

Exceptions:
DebugException Thrown if the debug command could not be executed.
BookmarkManager com.google.security.zynamics.binnavi.API.debug.Debugger.getBookmarkManager (  ) 

Returns the bookmark manager of the debugger. This manager can be used to set and remove memory bookmarks.

Returns:
The bookmark manager of the debugger.
BreakpointManager com.google.security.zynamics.binnavi.API.debug.Debugger.getBreakpointManager (  ) 

Returns the breakpoint manager of the debugger. This manager can be used to set and remove breakpoints.

Returns:
The breakpoint manager of the debugger.
Process com.google.security.zynamics.binnavi.API.debug.Debugger.getProcess (  ) 

Returns the target process debugged by the debugger.

Returns:
The target process of the debugger.
boolean com.google.security.zynamics.binnavi.API.debug.Debugger.isConnected (  ) 

Returns a flag that indicates whether the debugger is active or not.

Returns:
True, if the debugger is debugging a target. False, otherwise.
void com.google.security.zynamics.binnavi.API.debug.Debugger.readMemory ( final Address  address,
final int  size 
) throws DebugException

Reads memory of the target process.

Parameters:
address Start address of the memory read operation.
size Number of bytes to read.
Exceptions:
IllegalArgumentException Thrown if the address argument is null.
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.readRegisters (  )  throws DebugException

Reads the current register values of all threads of the target process.

Exceptions:
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.removeListener ( final IDebuggerListener  listener  ) 

Removes a debugger listener from the debugger.

Parameters:
listener The debugger listener to remove.
void com.google.security.zynamics.binnavi.API.debug.Debugger.requestFileSystem (  )  throws DebugException

Request the file system listing from the debug client.

Exceptions:
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.requestFileSystem ( final String  path  )  throws DebugException

Request the file system listing for the given path.

Parameters:
path The base directory to be listed.
Exceptions:
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.resume (  )  throws DebugException

Executes a resume command in the active thread.

Exceptions:
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.selectFile ( final String  file  )  throws DebugException

Tells the debug client to select the given file as the target process executable file.

Parameters:
file The path to the target file.
Exceptions:
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.singleStep (  )  throws DebugException

Executes a single step operation in the active thread.

Exceptions:
DebugException Thrown if the debug command could not be executed.
void com.google.security.zynamics.binnavi.API.debug.Debugger.terminate (  )  throws DebugException

Terminates the target process and the debug client.

Exceptions:
DebugException Thrown if the debug command could not be executed.
Address com.google.security.zynamics.binnavi.API.debug.Debugger.toFilebase ( final Module  module,
final Address  address 
)

Converts a memory-relocated address to the same address in the unrelocated module.

Parameters:
module The module the relocated address belongs to.
address The memory-relocated address to convert.
Returns:
The converted file address.
Address com.google.security.zynamics.binnavi.API.debug.Debugger.toImagebase ( final Module  module,
final Address  address 
)

Converts a file address to the same address in the relocated module.

Parameters:
module The module the file address address belongs to.
address The file address to convert.
Returns:
The converted memory-relocated address.
String com.google.security.zynamics.binnavi.API.debug.Debugger.toString (  ) 

Returns a string representation of the debugger.

Returns:
A string representation of the debugger.
void com.google.security.zynamics.binnavi.API.debug.Debugger.writeMemory ( final Address  address,
final byte[]  data 
) throws DebugException

Writes to the memory of the target process.

Parameters:
address Start address of the memory write operation.
data Data to be written to the target memory.
Exceptions:
DebugException Thrown if the message could not be sent to the debug client.
void com.google.security.zynamics.binnavi.API.debug.Debugger.writeRegister ( final long  tid,
final String  register,
final long  value 
) throws DebugException

Changes the value of a register in the given thread.

Parameters:
tid Thread ID of the thread whose register value is changed.
register Name of the register to change.
value The new value of the register.
Exceptions:
DebugException Thrown if the message could not be sent to the debug client.