Public Member Functions

com.google.security.zynamics.binnavi.API.disassembly.Module Class Reference

Inheritance diagram for com.google.security.zynamics.binnavi.API.disassembly.Module:
com.google.security.zynamics.binnavi.API.disassembly.ViewContainer

List of all members.

Public Member Functions

void addListener (final IModuleListener listener)
void close ()
View createView (final String name, final String description)
void deleteView (final View view) throws CouldntDeleteException
Callgraph getCallgraph ()
Date getCreationDate ()
Database getDatabase ()
Debugger getDebugger ()
DebuggerTemplate getDebuggerTemplate ()
String getDescription ()
Address getFilebase ()
Function getFunction (final View view)
List< FunctiongetFunctions ()
GlobalVariablesManager getGlobalVariablesManager ()
int getId ()
Address getImagebase ()
String getMD5 ()
Date getModificationDate ()
String getName ()
String getSHA1 ()
List< TracegetTraces ()
List< ViewgetViews ()
void initialize () throws CouldntSaveDataException
boolean isInitialized ()
boolean isLoaded ()
void load () throws CouldntLoadDataException
void removeListener (final IModuleListener listener)
void setDebuggerTemplate (final DebuggerTemplate template) throws CouldntSaveDataException
void setDescription (final String description) throws CouldntSaveDataException
void setFilebase (final Address address) throws CouldntSaveDataException
void setImagebase (final Address address) throws CouldntSaveDataException
void setName (final String name) throws CouldntSaveDataException
String toString ()

Detailed Description

A module represents a single disassembled file and everything you can do with it. This means that modules contain the original functions and the original callgraph as well as advanced features like views and the debugger associated with a module.


Member Function Documentation

void com.google.security.zynamics.binnavi.API.disassembly.Module.addListener ( final IModuleListener  listener  ) 

Adds an object that is notified about changes in the module.

Parameters:
listener The listener object that is notified about changes in the module.
Exceptions:
IllegalArgumentException Thrown if the listener argument is null.
IllegalStateException Thrown if the listener object is already listening on the module.
void com.google.security.zynamics.binnavi.API.disassembly.Module.close (  ) 

Closes the module. After a module is closed, using its content leads to undefined behaviour.

View com.google.security.zynamics.binnavi.API.disassembly.Module.createView ( final String  name,
final String  description 
)

Creates a new view that is added to the module.

Parameters:
name The name of the new view.
description The description of the new view.
Returns:
The newly created view.
Exceptions:
IllegalArgumentException Thrown if any of the arguments are null.

Implements com.google.security.zynamics.binnavi.API.disassembly.ViewContainer.

void com.google.security.zynamics.binnavi.API.disassembly.Module.deleteView ( final View  view  )  throws CouldntDeleteException

Deletes a non-native view from the module and from the database.

Parameters:
view The view to delete.
Exceptions:
CouldntDeleteException Thrown if the view could not be deleted.
Callgraph com.google.security.zynamics.binnavi.API.disassembly.Module.getCallgraph (  ) 

Returns the callgraph of the module. This graph contains all functions of the module as nodes and the function calls as edges between the nodes.

Returns:
The callgraph of the module.
Exceptions:
IllegalStateException Thrown if the module is not loaded.
Date com.google.security.zynamics.binnavi.API.disassembly.Module.getCreationDate (  ) 

Returns the creation date of the module. This is the date when the module was first written to the database.

Returns:
The creation date of the module.
Database com.google.security.zynamics.binnavi.API.disassembly.Module.getDatabase (  ) 

Returns the database the module belongs to.

Returns:
The database the module belongs to.

Implements com.google.security.zynamics.binnavi.API.disassembly.ViewContainer.

Debugger com.google.security.zynamics.binnavi.API.disassembly.Module.getDebugger (  ) 

Returns the debugger that is used to debug the module.

Returns:
The debugger that is used to debug the module.
DebuggerTemplate com.google.security.zynamics.binnavi.API.disassembly.Module.getDebuggerTemplate (  ) 

Returns the debugger template that defines the module debugger.

Returns:
The debugger template that defines the module debugger. This value can be null if no debugger template is set for the module.
String com.google.security.zynamics.binnavi.API.disassembly.Module.getDescription (  ) 

Returns the description of the module.

Returns:
The description of the module.
Address com.google.security.zynamics.binnavi.API.disassembly.Module.getFilebase (  ) 

Returns the file base of the module. This is the base address of the module according to the header of the original input file.

Returns:
The file base of the module.
Function com.google.security.zynamics.binnavi.API.disassembly.Module.getFunction ( final View  view  ) 

Returns the function associated with a view.

Parameters:
view The view whose associated function is returned. Please note that this view must be a native view because only native views have associated functions.
Returns:
The associated function.
List<Function> com.google.security.zynamics.binnavi.API.disassembly.Module.getFunctions (  ) 

Returns a list of all functions that can be found in the module.

Returns:
A list of functions.

Implements com.google.security.zynamics.binnavi.API.disassembly.ViewContainer.

GlobalVariablesManager com.google.security.zynamics.binnavi.API.disassembly.Module.getGlobalVariablesManager (  ) 

Returns the global variables manager of the module. This object can be used to access the global variables defined in the module.

Returns:
The global variables manager of the module.
int com.google.security.zynamics.binnavi.API.disassembly.Module.getId (  ) 

Returns the database ID of the module.

Returns:
The database ID of the module.
Address com.google.security.zynamics.binnavi.API.disassembly.Module.getImagebase (  ) 

Returns the image base of the module. This is the base address of the module as it really occurs in memory after potential relocation operations.

Returns:
The image base of the module.
String com.google.security.zynamics.binnavi.API.disassembly.Module.getMD5 (  ) 

Returns the MD5 hash of the original input file.

Returns:
The MD5 hash of the original input file.
Date com.google.security.zynamics.binnavi.API.disassembly.Module.getModificationDate (  ) 

Returns the modification date of the module. This is the date when the module was last written to the database.

Returns:
The modification date of the module.
String com.google.security.zynamics.binnavi.API.disassembly.Module.getName (  ) 

Returns the name of the module.

Returns:
The name of the module.
String com.google.security.zynamics.binnavi.API.disassembly.Module.getSHA1 (  ) 

Returns the SHA1 hash of the original input file.

Returns:
The SHA1 hash of the original input file.
List<Trace> com.google.security.zynamics.binnavi.API.disassembly.Module.getTraces (  ) 

Returns all debug traces recorded for this module.

Returns:
A list of debug traces.
List<View> com.google.security.zynamics.binnavi.API.disassembly.Module.getViews (  ) 

Returns a list of all views that can be found in the module.

Returns:
A list of views.
void com.google.security.zynamics.binnavi.API.disassembly.Module.initialize (  )  throws CouldntSaveDataException

Initialize the module in the database.

Exceptions:
CouldntSaveDataException Thrown if an error occurred while saving the initialized data to the database.
boolean com.google.security.zynamics.binnavi.API.disassembly.Module.isInitialized (  ) 

Check whether this module has been initialized.

Returns:
True if the module has been initialized.
boolean com.google.security.zynamics.binnavi.API.disassembly.Module.isLoaded (  ) 

Returns a flag that indicates whether the module is loaded.

Returns:
True, if the module is loaded. False, otherwise.
void com.google.security.zynamics.binnavi.API.disassembly.Module.load (  )  throws CouldntLoadDataException

Loads the module data from the database.

Exceptions:
IllegalStateException Thrown if the module is already loaded.
CouldntLoadDataException Thrown if the module data could not be loaded from the database.
void com.google.security.zynamics.binnavi.API.disassembly.Module.removeListener ( final IModuleListener  listener  ) 

Removes a listener object from the module.

Parameters:
listener The listener object to remove from the module.
Exceptions:
IllegalArgumentException Thrown if the listener argument is null.
IllegalStateException Thrown if the listener object was not listening on the module.
void com.google.security.zynamics.binnavi.API.disassembly.Module.setDebuggerTemplate ( final DebuggerTemplate  template  )  throws CouldntSaveDataException

Changes the debugger template of the module.

Parameters:
template The new debugger template.
Exceptions:
CouldntSaveDataException Thrown if the new debugger template could not be saved to the database.
void com.google.security.zynamics.binnavi.API.disassembly.Module.setDescription ( final String  description  )  throws CouldntSaveDataException

Changes the description of the module.

Parameters:
description The new description of the module.
Exceptions:
IllegalArgumentException Thrown if the description argument is null.
CouldntSaveDataException Thrown if the description of the module could not be changed.
void com.google.security.zynamics.binnavi.API.disassembly.Module.setFilebase ( final Address  address  )  throws CouldntSaveDataException

Changes the file base of the module.

Parameters:
address The new file base of the module.
Exceptions:
IllegalArgumentException Thrown if the address argument is null.
CouldntSaveDataException Thrown if the file base of the module could not be changed.
void com.google.security.zynamics.binnavi.API.disassembly.Module.setImagebase ( final Address  address  )  throws CouldntSaveDataException

Changes the image base of the module.

Parameters:
address The new image base of the module.
Exceptions:
IllegalArgumentException Thrown if the address argument is null.
CouldntSaveDataException Thrown if the image base of the module could not be changed.
void com.google.security.zynamics.binnavi.API.disassembly.Module.setName ( final String  name  )  throws CouldntSaveDataException

Changes the name of the module.

Parameters:
name The new name of the module.
Exceptions:
IllegalArgumentException Thrown if the name argument is null.
CouldntSaveDataException Thrown if the name of the module could not be changed.
String com.google.security.zynamics.binnavi.API.disassembly.Module.toString (  ) 

Returns the string representation of the module.

Returns:
The string representation of the module.