Class LLVMDisassembler


  • public class LLVMDisassembler
    extends java.lang.Object
    • 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 the TripleName.

        Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling CreateDisasmCPUFeatures 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 the TripleName and a specific CPU.

        Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling CreateDisasmCPUFeatures 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 the TripleName, a specific CPU and specific feature string.

        Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed as NULL. If successful, this returns a disassembler context. If not, it returns NULL.

      • LLVMSetDisasmOptions

        public static int LLVMSetDisasmOptions​(long DC,
                                               long Options)
        Set the disassembler's options. Returns 1 if it can set the Options 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 least BytesSize number of bytes. The instruction is at the address specified by the PC parameter. If a valid instruction can be disassembled, its string is returned indirectly in OutString whose size is specified in the parameter OutStringSize. This function returns the number of bytes in the instruction or zero if there was no valid instruction.