Public Member Functions

BinNavi.API.disassembly.AddressSpace Class Reference

Represents a single address space. More...

Inherits BinNavi::APIHelpers::ApiObject< INaviAddressSpace >.

List of all members.

Public Member Functions

void addListener (final IAddressSpaceListener listener)
 Adds an address space listener.
void addModule (final Module module) throws CouldntSaveDataException
 Adds a module to the address space.
boolean close ()
 Closes the address space.
Date getCreationDate ()
 Creation date of the address space.
Debugger getDebugger ()
 Debugger of the address space.
DebuggerTemplate getDebuggerTemplate ()
 Debugger template of the address space.
String getDescription ()
 Description of the address space.
Address getImagebase (final Module module)
 Returns the image base of a module inside an address space.
Date getModificationDate ()
 Modification date of the address space.
List< ModulegetModules ()
 List of modules in the address space.
String getName ()
 Name of the address space.
Project getProject ()
 The project the address space belongs to.
boolean isLoaded ()
 Checks if the address space is loaded.
void load () throws CouldntLoadDataException
 Loads the address space.
void removeListener (final IAddressSpaceListener listener)
 Removes an address space listener.
void removeModule (final Module module) throws CouldntDeleteException, CouldntSaveDataException
void setDebuggerTemplate (final DebuggerTemplate template) throws CouldntSaveDataException
 Changes the debugger template of the address space.
void setDescription (final String description) throws CouldntSaveDataException
 Changes the description of the address space.
void setImageBase (final Module module, final Address address) throws CouldntSaveDataException
 Changes the image base of a module in an address space.
void setName (final String name) throws CouldntSaveDataException
 Changes the name of the address space.
String toString ()
 Printable representation of the address space.

Detailed Description

Address spaces represent a single snapshot of memory. This snapshot can contain multiple modules that can interact with each other.


Member Function Documentation

void BinNavi.API.disassembly.AddressSpace.addListener ( final IAddressSpaceListener  listener  ) 

Adds an object that is notified about changes in the address space.

Parameters:
listener The listener object that is notified about changes in the address space.
Exceptions:
IllegalArgumentException Thrown if the listener argument is null.
IllegalStateException Thrown if the listener object is already listening on the address space.
void BinNavi.API.disassembly.AddressSpace.addModule ( final Module  module  )  throws CouldntSaveDataException

Adds a module to the address space.

Please note that each module can only be added once to an address space.

Parameters:
module The module to add to the address space.
Exceptions:
IllegalArgumentException Thrown if the module argument is null or the module is not in the same database as the address space.
IllegalStateException Thrown if the address space is not loaded or the module is already part of the address space.
CouldntSaveDataException Thrown if the module could not be added to the address space.
boolean BinNavi.API.disassembly.AddressSpace.close (  ) 

Closes the address space.

It is possible that the address space stays open because other plugins can veto the close operation if they require the address space to remain open.

Returns:
True, if the address space was closed. False, otherwise.
Date BinNavi.API.disassembly.AddressSpace.getCreationDate (  ) 

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

Returns:
The creation date of the module.
Debugger BinNavi.API.disassembly.AddressSpace.getDebugger (  ) 

Returns the debugger that is used to debug the address space.

Returns:
The debugger that is used to debug the address space.
DebuggerTemplate BinNavi.API.disassembly.AddressSpace.getDebuggerTemplate (  ) 

Returns the debugger template that was used to create the current address space debugger.

Returns:
The debugger template of the address space debugger.
String BinNavi.API.disassembly.AddressSpace.getDescription (  ) 

Returns the description of the address space.

Returns:
The description of the address space.
Address BinNavi.API.disassembly.AddressSpace.getImagebase ( final Module  module  ) 

Returns the image base of a module inside an address space.

Parameters:
module The module whose image base is returned.
Returns:
The image base of the module inside the address space.
Date BinNavi.API.disassembly.AddressSpace.getModificationDate (  ) 

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

Returns:
The modification date of the address space.
List<Module> BinNavi.API.disassembly.AddressSpace.getModules (  ) 

Returns the list of modules that are part of the address space.

Returns:
A list of modules.
String BinNavi.API.disassembly.AddressSpace.getName (  ) 

Returns the name of the address space.

Returns:
The name of the address space.
Project BinNavi.API.disassembly.AddressSpace.getProject (  ) 

Returns the project the address space belongs to.

Returns:
The project the address space belongs to.
boolean BinNavi.API.disassembly.AddressSpace.isLoaded (  ) 

Returns a flag that indicates whether the address space is loaded.

Returns:
True, if the address space is loaded. False, otherwise.
void BinNavi.API.disassembly.AddressSpace.load (  )  throws CouldntLoadDataException

Loads the address space. If the address space is already loaded nothing happens.

Exceptions:
CouldntLoadDataException Thrown if the address space could not be loaded.
void BinNavi.API.disassembly.AddressSpace.removeListener ( final IAddressSpaceListener  listener  ) 

Removes a listener object from the address space.

Parameters:
listener The listener object to remove from the address space.
Exceptions:
IllegalArgumentException Thrown if the listener argument is null.
IllegalStateException Thrown if the listener object was not listening on the address space.
void BinNavi.API.disassembly.AddressSpace.removeModule ( final Module  module  )  throws CouldntDeleteException, CouldntSaveDataException

Removes a module from the address space.

Parameters:
module The module to be removed from the address space.
Exceptions:
CouldntDeleteException Thrown if the module could not be deleted.
CouldntSaveDataException Thrown if the modification time could not be saved.
void BinNavi.API.disassembly.AddressSpace.setDebuggerTemplate ( final DebuggerTemplate  template  )  throws CouldntSaveDataException

Changes the debugger template of the address space.

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.AddressSpace.setDescription ( final String  description  )  throws CouldntSaveDataException

Changes the description of the address space.

Parameters:
description The new description of the address space.
Exceptions:
IllegalArgumentException Thrown if the description argument is null.
CouldntSaveDataException Thrown if the description of the address space could not be changed.
void BinNavi.API.disassembly.AddressSpace.setImageBase ( final Module  module,
final Address  address 
) throws CouldntSaveDataException

Changes the image base of a module in the context of the address space.

Parameters:
module The module whose image base is changed.
address The new image base of the module.
Exceptions:
CouldntSaveDataException Thrown if the new image base could not be set.
void BinNavi.API.disassembly.AddressSpace.setName ( final String  name  )  throws CouldntSaveDataException

Changes the name of the address space.

Parameters:
name The new name of the address space.
Exceptions:
IllegalArgumentException Thrown if the name argument is null.
CouldntSaveDataException Thrown if the name of the address space could not be changed.
String BinNavi.API.disassembly.AddressSpace.toString (  ) 

Converts the address space to a printable string.

Returns:
The printable representation of the address space.