Java Code Examples for ghidra.program.model.lang.Language#isBigEndian()
The following examples show how to use
ghidra.program.model.lang.Language#isBigEndian() .
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: CoffSectionHeader.java From ghidra with Apache License 2.0 | 6 votes |
/** * Returns an input stream that will supply the bytes * for this section. * @return the input stream * @throws IOException if an I/O error occurs */ public InputStream getRawDataStream(ByteProvider provider, Language language) throws IOException { // XXX XXX XXX XXX // XXX XXX XXX XXX // It is NOT CLEAR AT ALL that all big endian, > 1-byte wordsize executables should be BYTE-SWAPPED!!! // XXX XXX XXX XXX // XXX XXX XXX XXX int addressableUnitSize = language.getAddressFactory().getDefaultAddressSpace().getAddressableUnitSize(); if (addressableUnitSize > 1 && language.isBigEndian()) { return new BigEndianUnitSizeByteSwapperInputStream(provider.getInputStream(s_scnptr), addressableUnitSize); } return provider.getInputStream(s_scnptr); }
Example 2
Source File: DumpMiscState.java From ghidra with Apache License 2.0 | 4 votes |
public DumpMiscState(Language lang) { dc = lang.isBigEndian() ? BigEndianDataConverter.INSTANCE : LittleEndianDataConverter.INSTANCE; }
Example 3
Source File: FilteredRegisterBank.java From ghidra with Apache License 2.0 | 4 votes |
public FilteredRegisterBank(AddressSpace spc, int ps, RegisterState initState, Language lang, boolean writeBack, MemoryFaultHandler faultHandler) { super(spc, lang.isBigEndian(), ps, faultHandler); //regState = initState; //this.writeBack = writeBack; }
Example 4
Source File: MemoryMapDB.java From ghidra with Apache License 2.0 | 4 votes |
public void setLanguage(Language newLanguage) { defaultEndian = newLanguage.isBigEndian() ? BIG_ENDIAN : LITTLE_ENDIAN; }
Example 5
Source File: CoffSectionHeader.java From ghidra with Apache License 2.0 | 4 votes |
public boolean isProcessedBytes(Language language) { int addressableUnitSize = language.getAddressFactory().getDefaultAddressSpace().getAddressableUnitSize(); return addressableUnitSize > 1 && language.isBigEndian(); }
Example 6
Source File: GNUExternalDisassembler.java From ghidra with Apache License 2.0 | 4 votes |
GdisConfig(Language lang) { this(lang, lang.isBigEndian()); }