Java Code Examples for ghidra.program.model.listing.Program#getAddressMap()
The following examples show how to use
ghidra.program.model.listing.Program#getAddressMap() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MarkupItemStorageDB.java From ghidra with Apache License 2.0 | 6 votes |
@Override public MarkupItemStorage setDestinationAddress(Address destinationAddress, String addressSource) { if (destinationAddress == null) { destinationAddress = Address.NO_ADDRESS; } Program destinationProgram = session.getDestinationProgram(); AddressMap addressMap = destinationProgram.getAddressMap(); long addressID = addressMap.getKey(destinationAddress, false); record.setLongValue(DESTINATION_ADDRESS_COL.column(), addressID); record.setString(ADDRESS_SOURCE_COL.column(), addressSource); associationManager.updateMarkupRecord(record); return this; }
Example 2
Source File: MarkupItemStorageDB.java From ghidra with Apache License 2.0 | 5 votes |
@Override public Address getSourceAddress() { long addressLong = record.getLongValue(SOURCE_ADDRESS_COL.column()); Program program = session.getSourceProgram(); AddressMap addressMap = program.getAddressMap(); return addressMap.decodeAddress(addressLong); }
Example 3
Source File: MarkupItemStorageDB.java From ghidra with Apache License 2.0 | 5 votes |
@Override public Address getDestinationAddress() { long addressLong = record.getLongValue(DESTINATION_ADDRESS_COL.column()); Program program = session.getDestinationProgram(); AddressMap addressMap = program.getAddressMap(); return addressMap.decodeAddress(addressLong); }
Example 4
Source File: VTMatchMarkupItemTableDBAdapterV0.java From ghidra with Apache License 2.0 | 4 votes |
private long getAddressID(Program program, Address address) { AddressMap addressMap = program.getAddressMap(); return addressMap.getKey(address, false); }