Class DBTracePlatformManager.DBTraceHostPlatform
- All Implemented Interfaces:
ProgramArchitecture,InternalTracePlatform,TracePlatform
- Enclosing class:
DBTracePlatformManager
-
Field Summary
Fields inherited from interface ghidra.trace.database.guest.InternalTracePlatform
REG_MAP_BE, REG_MAP_LE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the address factory of the guest platformGet the compiler of the guest platformGet the data type manager for this platform.Get the addresses in the guest which are mapped to somehere in the hostGet the addresses in the host which are mapped to somewhere in the guestintGet the entry's key in the table as an integerGet the language of the guest platformgetMappedMemBuffer(long snap, Address guestAddress) Get a memory buffer, which presents the host bytes in the guest address spacegetTrace()Get the tracebooleanisGuest()Check if this is a guest platformCopy the given instruction set, but with addresses mapped from the guest space to the host spacemapGuestToHost(Address guestAddress) Translate an address from guest to hostmapGuestToHost(AddressRange guestRange) Translate a range from guest to hostmapGuestToHost(AddressSetView guestSet) Translate a set from guest to hostmapHostToGuest(Address hostAddress) Translate an address from host to guestmapHostToGuest(AddressRange hostRange) Translate a range from host to guestmapHostToGuest(AddressSetView hostSet) Translate a set from host to guestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.guest.InternalTracePlatform
addRegisterMapOverride, getConventionalRegisterObjectNames, getConventionalRegisterPath, getConventionalRegisterPath, getConventionalRegisterPath, getConventionalRegisterPath, getConventionalRegisterRange, getRegistersRange, listRegNamesMethods inherited from interface ghidra.program.model.lang.ProgramArchitecture
getLanguageCompilerSpecPairMethods inherited from interface ghidra.trace.model.guest.TracePlatform
isHost
-
Constructor Details
-
DBTraceHostPlatform
public DBTraceHostPlatform()
-
-
Method Details
-
getTrace
Description copied from interface:TracePlatformGet the trace- Specified by:
getTracein interfaceTracePlatform- Returns:
- the trace
-
getLanguageEntry
- Specified by:
getLanguageEntryin interfaceInternalTracePlatform
-
getIntKey
public int getIntKey()Description copied from interface:InternalTracePlatformGet the entry's key in the table as an integer- Specified by:
getIntKeyin interfaceInternalTracePlatform- Returns:
- the key
-
isGuest
public boolean isGuest()Description copied from interface:TracePlatformCheck if this is a guest platform- Specified by:
isGuestin interfaceTracePlatform- Returns:
- true for guest, false for host
-
getLanguage
Description copied from interface:TracePlatformGet the language of the guest platform- Specified by:
getLanguagein interfaceProgramArchitecture- Specified by:
getLanguagein interfaceTracePlatform- Returns:
- the language
-
getCompilerSpec
Description copied from interface:TracePlatformGet the compiler of the guest platform- Specified by:
getCompilerSpecin interfaceProgramArchitecture- Specified by:
getCompilerSpecin interfaceTracePlatform- Returns:
- the compiler specification
-
getAddressFactory
Description copied from interface:TracePlatformGet the address factory of the guest platform- Specified by:
getAddressFactoryin interfaceInternalTracePlatform- Specified by:
getAddressFactoryin interfaceProgramArchitecture- Specified by:
getAddressFactoryin interfaceTracePlatform- Returns:
- the factory
-
getDataTypeManager
Description copied from interface:TracePlatformGet the data type manager for this platform.- Specified by:
getDataTypeManagerin interfaceTracePlatform- Returns:
- the data type manager
-
getHostAddressSet
Description copied from interface:TracePlatformGet the addresses in the host which are mapped to somewhere in the guest- Specified by:
getHostAddressSetin interfaceTracePlatform- Returns:
- the address set
-
getGuestAddressSet
Description copied from interface:TracePlatformGet the addresses in the guest which are mapped to somehere in the host- Specified by:
getGuestAddressSetin interfaceTracePlatform- Returns:
- the address set
-
mapHostToGuest
Description copied from interface:TracePlatformTranslate an address from host to guest- Specified by:
mapHostToGuestin interfaceTracePlatform- Parameters:
hostAddress- the host address- Returns:
- the guest address
-
mapHostToGuest
Description copied from interface:TracePlatformTranslate a range from host to guestThe entire range must be mapped to a single range.
- Specified by:
mapHostToGuestin interfaceTracePlatform- Parameters:
hostRange- the host range- Returns:
- the guest range
-
mapHostToGuest
Description copied from interface:TracePlatformTranslate a set from host to guestOnly those ranges (or parts of ranges) that mapped are included.
- Specified by:
mapHostToGuestin interfaceTracePlatform- Parameters:
hostSet- the host set- Returns:
- the guest set
-
mapGuestToHost
Description copied from interface:TracePlatformTranslate an address from guest to host- Specified by:
mapGuestToHostin interfaceTracePlatform- Parameters:
guestAddress- the guest address- Returns:
- the host address
-
mapGuestToHost
Description copied from interface:TracePlatformTranslate a range from guest to hostThe entire range must be mapped to a single range.
- Specified by:
mapGuestToHostin interfaceTracePlatform- Parameters:
guestRange- the guest range- Returns:
- the host range
-
mapGuestToHost
Description copied from interface:TracePlatformTranslate a set from guest to hostOnly those ranges (or parts of ranges) that mapped are included.
- Specified by:
mapGuestToHostin interfaceTracePlatform- Parameters:
guestSet- the guest set- Returns:
- the host set
-
getMappedMemBuffer
Description copied from interface:TracePlatformGet a memory buffer, which presents the host bytes in the guest address spaceThis, with pseudo-disassembly, is the primary mechanism for adding instructions in the guest language.
- Specified by:
getMappedMemBufferin interfaceTracePlatform- Parameters:
snap- the snap, up to which the most recent memory changes are presentedguestAddress- the starting address in the guest space- Returns:
- the mapped memory buffer
-
mapGuestInstructionAddressesToHost
Description copied from interface:TracePlatformCopy the given instruction set, but with addresses mapped from the guest space to the host spaceInstructions which do not map are silently ignored. If concerned, the caller ought to examine the resulting instruction set and/or the resulting address set after it is added to the trace. A single instruction cannot span two mapped ranges, even if the comprised bytes are consecutive in the guest space. Mapping such an instruction back into the host space would cause the instruction to be split in the middle, which is not possible. Thus, such instructions are silently ignored.
- Specified by:
mapGuestInstructionAddressesToHostin interfaceTracePlatform- Parameters:
set- the instruction set in the guest space- Returns:
- the instruction set in the host space
-