Package ghidra.program.model.address
Class AddressMapImpl
- java.lang.Object
-
- ghidra.program.model.address.AddressMapImpl
-
public class AddressMapImpl extends java.lang.Object
AddressMapImpl
provides a stand-alone AddressMap. An AddressMapImpl instance should only be used to decode keys which it has generated. If this map is used for a specific program instance, the map should be discard if any changes are made to that programs address map (e.g., removing or renaming overlay spaces).
-
-
Constructor Summary
Constructors Constructor Description AddressMapImpl()
Creates a new AddressMapImpl with a mapID of 0.AddressMapImpl(byte mapID, AddressFactory addrFactory)
Creates a new AddressMapImpl with the specified mapID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Address
decodeAddress(long value)
int
findKeyRange(java.util.List<KeyRange> keyRangeList, Address addr)
long
getKey(Address addr)
Generate a unique key for the specified addr.java.util.List<KeyRange>
getKeyRanges(Address start, Address end)
java.util.List<KeyRange>
getKeyRanges(AddressSetView set)
void
reconcile()
Reconcile address space changes using associated address factory.
-
-
-
Constructor Detail
-
AddressMapImpl
public AddressMapImpl()
Creates a new AddressMapImpl with a mapID of 0.
-
AddressMapImpl
public AddressMapImpl(byte mapID, AddressFactory addrFactory)
Creates a new AddressMapImpl with the specified mapID- Parameters:
mapID
- the 8-bit value is placed in the upper 8 bits of every address encoding.
-
-
Method Detail
-
decodeAddress
public Address decodeAddress(long value)
- See Also:
AddressMap.decodeAddress(long)
-
getKey
public long getKey(Address addr)
Generate a unique key for the specified addr. Only addresses from a single address space or single program should be passed to this method. Only limited checking is not performed in order to improve performance.- Parameters:
addr
- address- See Also:
AddressMap.getKey(Address, boolean)
-
findKeyRange
public int findKeyRange(java.util.List<KeyRange> keyRangeList, Address addr)
- See Also:
AddressMap.findKeyRange(List, Address)
-
getKeyRanges
public java.util.List<KeyRange> getKeyRanges(AddressSetView set)
-
reconcile
public void reconcile()
Reconcile address space changes using associated address factory. This method should be invoked following an undo/redo (if the associated address factory may have changed) or removal of an overlay memory block.
-
-