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 class
LLVMDisassembler.Functions
Contains the function pointers loaded fromLLVMCore.getLibrary()
.
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
LLVMCreateDisasm(java.lang.CharSequence TripleName, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)
Create a disassembler for theTripleName
.static long
LLVMCreateDisasm(java.nio.ByteBuffer TripleName, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)
Create a disassembler for theTripleName
.static long
LLVMCreateDisasmCPU(java.lang.CharSequence Triple, java.lang.CharSequence CPU, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)
Create a disassembler for theTripleName
and a specific CPU.static long
LLVMCreateDisasmCPU(java.nio.ByteBuffer Triple, java.nio.ByteBuffer CPU, long DisInfo, int TagType, LLVMOpInfoCallbackI GetOpInfo, LLVMSymbolLookupCallbackI SymbolLookUp)
Create a disassembler for theTripleName
and a specific CPU.static long
LLVMCreateDisasmCPUFeatures(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 long
LLVMCreateDisasmCPUFeatures(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 void
LLVMDisasmDispose(long DC)
Dispose of a disassembler context.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.static int
LLVMSetDisasmOptions(long DC, long Options)
Set the disassembler's options.static long
nLLVMCreateDisasm(long TripleName, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)
Unsafe version of:CreateDisasm
static long
nLLVMCreateDisasmCPU(long Triple, long CPU, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)
Unsafe version of:CreateDisasmCPU
static long
nLLVMCreateDisasmCPUFeatures(long Triple, long CPU, long Features, long DisInfo, int TagType, long GetOpInfo, long SymbolLookUp)
Unsafe version of:CreateDisasmCPUFeatures
static long
nLLVMDisasmInstruction(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
DisInfo
parameter and specifying theTagType
and 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 callingCreateDisasmCPUFeatures
with 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 theTripleName
and a specific CPU.Symbolic disassembly is supported by passing a block of information in the
DisInfo
parameter and specifying theTagType
and 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 callingCreateDisasmCPUFeatures
with 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
DisInfo
parameter and specifying theTagType
and 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 theOptions
and 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 leastBytesSize
number of bytes. The instruction is at the address specified by thePC
parameter. If a valid instruction can be disassembled, its string is returned indirectly inOutString
whose size is specified in the parameterOutStringSize
. This function returns the number of bytes in the instruction or zero if there was no valid instruction.
-
-