Package ghidra.program.database
Class ProgramAddressFactory
- java.lang.Object
-
- ghidra.program.model.address.DefaultAddressFactory
-
- ghidra.program.database.ProgramAddressFactory
-
- All Implemented Interfaces:
AddressFactory
public class ProgramAddressFactory extends DefaultAddressFactory
-
-
Constructor Summary
Constructors Constructor Description ProgramAddressFactory(Language language, CompilerSpec compilerSpec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOverlayAddressSpace(OverlayAddressSpace ovSpace)OverlayAddressSpaceaddOverlayAddressSpace(java.lang.String name, AddressSpace originalSpace, long minOffset, long maxOffset)AddressgetAddress(int spaceID, long offset)Get an address using the addressSpace with the given id and having the given offset.AddressgetAddress(java.lang.String addrString)Create an address from String.AddressSpacegetStackSpace()Returns the "stack" address space.protected voidrenameOverlaySpace(java.lang.String oldName, java.lang.String newName)-
Methods inherited from class ghidra.program.model.address.DefaultAddressFactory
addAddressSpace, equals, getAddressSet, getAddressSet, getAddressSpace, getAddressSpace, getAddressSpaces, getAllAddresses, getAllAddresses, getAllAddressSpaces, getConstantAddress, getConstantSpace, getDefaultAddressSpace, getIndex, getNumAddressSpaces, getPhysicalSpace, getPhysicalSpaces, getRegisterSpace, getUniqueSpace, hasMultipleMemorySpaces, isValidAddress, oldGetAddressFromLong, removeAddressSpace
-
-
-
-
Constructor Detail
-
ProgramAddressFactory
public ProgramAddressFactory(Language language, CompilerSpec compilerSpec)
-
-
Method Detail
-
getStackSpace
public AddressSpace getStackSpace()
Description copied from interface:AddressFactoryReturns the "stack" address space.- Specified by:
getStackSpacein interfaceAddressFactory- Overrides:
getStackSpacein classDefaultAddressFactory
-
addOverlayAddressSpace
public void addOverlayAddressSpace(OverlayAddressSpace ovSpace) throws DuplicateNameException
- Throws:
DuplicateNameException
-
addOverlayAddressSpace
public OverlayAddressSpace addOverlayAddressSpace(java.lang.String name, AddressSpace originalSpace, long minOffset, long maxOffset) throws DuplicateNameException
- Throws:
DuplicateNameException
-
getAddress
public Address getAddress(int spaceID, long offset)
Description copied from interface:AddressFactoryGet an address using the addressSpace with the given id and having the given offset.- Specified by:
getAddressin interfaceAddressFactory- Overrides:
getAddressin classDefaultAddressFactory- Parameters:
spaceID- the id of the address space to use to create the new address.offset- the offset of the new address to be created.- Returns:
- the new address.
-
getAddress
public Address getAddress(java.lang.String addrString)
Description copied from interface:AddressFactoryCreate an address from String. Attempts to use the "default" address space first. Otherwise loops through each addressSpace, returning the first valid address that any addressSpace creates from the string. Returns an Address if the string is valid, otherwise null.- Specified by:
getAddressin interfaceAddressFactory- Overrides:
getAddressin classDefaultAddressFactory- See Also:
AddressFactory.getAddress(java.lang.String)
-
renameOverlaySpace
protected void renameOverlaySpace(java.lang.String oldName, java.lang.String newName) throws DuplicateNameException- Overrides:
renameOverlaySpacein classDefaultAddressFactory- Throws:
DuplicateNameException
-
-