Class VariableStorageManagerDB

java.lang.Object
ghidra.program.database.symbol.VariableStorageManagerDB
All Implemented Interfaces:
VariableStorageManager

public class VariableStorageManagerDB extends Object implements VariableStorageManager
  • Constructor Details

  • Method Details

    • setProgramArchitecture

      public void setProgramArchitecture(ProgramArchitecture arch)
      Set program architecture.
      Parameters:
      arch - program architecture
    • delete

      public static void delete(DBHandle dbHandle) throws IOException
      Delete the DB table which correspnds to this variable storage implementation
      Parameters:
      dbHandle - database handle
      Throws:
      IOException - if an IO error occurs
    • exists

      public static boolean exists(DBHandle dbHandle)
      Determine if the variable storage manager table already exists
      Parameters:
      dbHandle - database handle
      Returns:
      true if storage table exists
    • getVariableStorageAddress

      public Address getVariableStorageAddress(VariableStorage storage, boolean create) throws IOException
      Get a variable address for the given storage specification. NOTE: The program architecture and error handler must be set appropriately prior to invocation of this method (see setProgramArchitecture(ProgramArchitecture).
      Specified by:
      getVariableStorageAddress in interface VariableStorageManager
      Parameters:
      storage - variable storage specification
      create - if true a new variable address will be allocated if needed
      Returns:
      variable address which corresponds to the storage specification or null if not found and create is false.
      Throws:
      IOException - if an IO error occurs
    • setLanguage

      public void setLanguage(LanguageTranslator translator, TaskMonitor monitor) throws CancelledException
      Perform language translation. Following the invocation of this method it is important to ensure that the program architecure is adjusted if neccessary. Update variable storage specifications to reflect address space and register mappings
      Parameters:
      translator - language translator to be used for mapping storage varnodes to new architecture.
      monitor - task monitor
      Throws:
      CancelledException - if task is cancelled