Public Member Functions

BinNavi.API.disassembly.Module Class Reference

Represents a single module. More...

Inheritance diagram for BinNavi.API.disassembly.Module:
BinNavi.API.disassembly.ViewContainer

List of all members.

Public Member Functions

void addListener (final IModuleListener listener)
 Adds a module listener.
void close ()
 Closes the module.
View createView (final String name, final String description)
 Creates a new view.
void deleteView (final View view) throws CouldntDeleteException
 Deletes a view from the module.
Callgraph getCallgraph ()
 Callgraph of the module.
Date getCreationDate ()
 Creation date of the module.
Database getDatabase ()
 The database the module belongs to.
Debugger getDebugger ()
 Debugger of the module.
DebuggerTemplate getDebuggerTemplate ()
 Debugger template of the module.
String getDescription ()
 Description of the module.
Address getFilebase ()
 File base of the module.
Function getFunction (final View view)
 Returns the function of a view.
List< FunctiongetFunctions ()
 Functions inside the module.
GlobalVariablesManager getGlobalVariablesManager ()
 Global variables manager of the module.
int getId ()
 Database ID of the module.
Address getImagebase ()
 Image base of the module.
String getMD5 ()
 MD5 hash of the original input file.
Date getModificationDate ()
 Modification date of the module.
String getName ()
 Name of the module.
String getSHA1 ()
 SHA1 hash of the original input file.
List< TracegetTraces ()
 Recorded module traces.
List< ViewgetViews ()
 Views inside this module.
boolean isLoaded ()
 Checks if the module is loaded.
void load () throws CouldntLoadDataException
 Loads the module.
void removeListener (final IModuleListener listener)
 Removes a module listener.
void setDebuggerTemplate (final DebuggerTemplate template) throws CouldntSaveDataException
 Changes the debugger template of the module.
void setDescription (final String description) throws CouldntSaveDataException
 Changes the module description.
void setFilebase (final Address address) throws CouldntSaveDataException
 Changes the module file base.
void setImagebase (final Address address) throws CouldntSaveDataException
 Changes the module image base.
void setName (final String name) throws CouldntSaveDataException
 Changes the module name.
String toString ()
 Printable representation of the module.

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 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 BinNavi.API.disassembly.Module.close (  ) 

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

View 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 BinNavi.API.disassembly.ViewContainer.

void 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 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 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 BinNavi.API.disassembly.Module.getDatabase (  ) 

Returns the database the module belongs to.

Returns:
The database the module belongs to.

Implements BinNavi.API.disassembly.ViewContainer.

Debugger 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 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 BinNavi.API.disassembly.Module.getDescription (  ) 

Returns the description of the module.

Returns:
The description of the module.
Address 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 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> BinNavi.API.disassembly.Module.getFunctions (  ) 

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

Returns:
A list of functions.

Implements BinNavi.API.disassembly.ViewContainer.

GlobalVariablesManager 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 BinNavi.API.disassembly.Module.getId (  ) 

Returns the database ID of the module.

Returns:
The database ID of the module.
Address 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 BinNavi.API.disassembly.Module.getMD5 (  ) 

Returns the MD5 hash of the original input file.

Returns:
The MD5 hash of the original input file.
Date 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 BinNavi.API.disassembly.Module.getName (  ) 

Returns the name of the module.

Returns:
The name of the module.
String 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> BinNavi.API.disassembly.Module.getTraces (  ) 

Returns all debug traces recorded for this module.

Returns:
A list of debug traces.
List<View> BinNavi.API.disassembly.Module.getViews (  ) 

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

Returns:
A list of views.
boolean 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 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 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 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 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 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 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 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 BinNavi.API.disassembly.Module.toString (  ) 

Returns the string representation of the module.

Returns:
The string representation of the module.