Class LLVMDisassembler
- java.lang.Object
-
- org.lwjgl.llvm.LLVMDisassembler
-
public class LLVMDisassembler extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLLVMDisassembler.FunctionsContains the function pointers loaded fromLLVMCore.getLibrary().
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longLLVMCreateDisasm(java.lang.CharSequence TripleName, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleName.static longLLVMCreateDisasm(java.nio.ByteBuffer TripleName, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleName.static longLLVMCreateDisasmCPU(java.lang.CharSequence Triple, java.lang.CharSequence CPU, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleNameand a specific CPU.static longLLVMCreateDisasmCPU(java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleNameand a specific CPU.static longLLVMCreateDisasmCPUFeatures(java.lang.CharSequence Triple, java.lang.CharSequence CPU, java.lang.CharSequence Features, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleName, a specific CPU and specific feature string.static longLLVMCreateDisasmCPUFeatures(java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, java.nio.ByteBuffer Features, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleName, a specific CPU and specific feature string.static voidLLVMDisasmDispose(long DC)Dispose of a disassembler context.static longLLVMDisasmInstruction(long DC, java.nio.ByteBuffer Bytes, long PC, java.nio.ByteBuffer OutString)Disassemble a single instruction using the disassembler context specified in the parameter DC.static intLLVMSetDisasmOptions(long DC, long Options)Set the disassembler's options.static longnLLVMCreateDisasm(long TripleName, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)Unsafe version of:CreateDisasmstatic longnLLVMCreateDisasmCPU(long Triple, long CPU, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)Unsafe version of:CreateDisasmCPUstatic longnLLVMCreateDisasmCPUFeatures(long Triple, long CPU, long Features, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)Unsafe version of:CreateDisasmCPUFeaturesstatic longnLLVMDisasmInstruction(long DC, long Bytes, long BytesSize, long PC, long OutString, long OutStringSize)Unsafe version of:DisasmInstruction
-
-
-
Field Detail
-
LLVMDisassembler_VariantKind_None
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM_HI16
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM_LO16
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM64_PAGE
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM64_PAGEOFF
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM64_GOTPAGE
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM64_GOTPAGEOFF
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM64_TLVP
- See Also:
- Constant Field Values
-
LLVMDisassembler_VariantKind_ARM64_TLVOFF
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_InOut_None
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_Branch
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_PCrel_Load
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_SymbolStub
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_LitPool_SymAddr
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_Objc_CFString_Ref
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_Objc_Message
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_Objc_Message_Ref
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_Objc_Selector_Ref
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_Out_Objc_Class_Ref
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_DeMangled_Name
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_ARM64_ADRP
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_ARM64_ADDXri
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_ARM64_LDRXui
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_ARM64_LDRXl
- See Also:
- Constant Field Values
-
LLVMDisassembler_ReferenceType_In_ARM64_ADR
- See Also:
- Constant Field Values
-
LLVMDisassembler_Option_UseMarkup
- See Also:
- Constant Field Values
-
LLVMDisassembler_Option_PrintImmHex
- See Also:
- Constant Field Values
-
LLVMDisassembler_Option_AsmPrinterVariant
- See Also:
- Constant Field Values
-
LLVMDisassembler_Option_SetInstrComments
- See Also:
- Constant Field Values
-
LLVMDisassembler_Option_PrintLatency
- See Also:
- Constant Field Values
-
-
Method Detail
-
nLLVMCreateDisasm
public static long nLLVMCreateDisasm(long TripleName, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)Unsafe version of:CreateDisasm
-
LLVMCreateDisasm
public static long LLVMCreateDisasm(java.nio.ByteBuffer TripleName, long DisInfo, int TagType, @Nullable LLVMOpInfoCallbackI GetOpInfo, @Nullable LLVMSymbolLookupCallbackI SymbolLookUp) public static long LLVMCreateDisasm(java.lang.CharSequence TripleName, long DisInfo, int TagType, @Nullable LLVMOpInfoCallbackI GetOpInfo, @Nullable LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleName.Symbolic disassembly is supported by passing a block of information in the
DisInfoparameter and specifying theTagTypeand callback functions as described above. These can all be passed asNULL. If successful, this returns a disassembler context. If not, it returnsNULL. This function is equivalent to callingCreateDisasmCPUFeatureswith an empty CPU name and feature set.
-
nLLVMCreateDisasmCPU
public static long nLLVMCreateDisasmCPU(long Triple, long CPU, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)Unsafe version of:CreateDisasmCPU
-
LLVMCreateDisasmCPU
public static long LLVMCreateDisasmCPU(java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, long DisInfo, int TagType, @Nullable LLVMOpInfoCallbackI GetOpInfo, @Nullable LLVMSymbolLookupCallbackI SymbolLookUp) public static long LLVMCreateDisasmCPU(java.lang.CharSequence Triple, java.lang.CharSequence CPU, long DisInfo, int TagType, @Nullable LLVMOpInfoCallbackI GetOpInfo, @Nullable LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleNameand a specific CPU.Symbolic disassembly is supported by passing a block of information in the
DisInfoparameter and specifying theTagTypeand callback functions as described above. These can all be passed asNULL. If successful, this returns a disassembler context. If not, it returnsNULL. This function is equivalent to callingCreateDisasmCPUFeatureswith an empty feature set.
-
nLLVMCreateDisasmCPUFeatures
public static long nLLVMCreateDisasmCPUFeatures(long Triple, long CPU, long Features, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)Unsafe version of:CreateDisasmCPUFeatures
-
LLVMCreateDisasmCPUFeatures
public static long LLVMCreateDisasmCPUFeatures(java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, java.nio.ByteBuffer Features, long DisInfo, int TagType, @Nullable LLVMOpInfoCallbackI GetOpInfo, @Nullable LLVMSymbolLookupCallbackI SymbolLookUp) public static long LLVMCreateDisasmCPUFeatures(java.lang.CharSequence Triple, java.lang.CharSequence CPU, java.lang.CharSequence Features, long DisInfo, int TagType, @Nullable LLVMOpInfoCallbackI GetOpInfo, @Nullable LLVMSymbolLookupCallbackI SymbolLookUp)Create a disassembler for theTripleName, a specific CPU and specific feature string.Symbolic disassembly is supported by passing a block of information in the
DisInfoparameter and specifying theTagTypeand callback functions as described above. These can all be passed asNULL. If successful, this returns a disassembler context. If not, it returnsNULL.
-
LLVMSetDisasmOptions
public static int LLVMSetDisasmOptions(long DC, long Options)Set the disassembler's options. Returns 1 if it can set theOptionsand 0 otherwise.
-
LLVMDisasmDispose
public static void LLVMDisasmDispose(long DC)
Dispose of a disassembler context.
-
nLLVMDisasmInstruction
public static long nLLVMDisasmInstruction(long DC, long Bytes, long BytesSize, long PC, long OutString, long OutStringSize)Unsafe version of:DisasmInstruction
-
LLVMDisasmInstruction
public static long LLVMDisasmInstruction(long DC, java.nio.ByteBuffer Bytes, long PC, java.nio.ByteBuffer OutString)Disassemble a single instruction using the disassembler context specified in the parameter DC.The bytes of the instruction are specified in the parameter
Bytes, and contains at leastBytesSizenumber of bytes. The instruction is at the address specified by thePCparameter. If a valid instruction can be disassembled, its string is returned indirectly inOutStringwhose size is specified in the parameterOutStringSize. This function returns the number of bytes in the instruction or zero if there was no valid instruction.
-
-