예제 #1
0
        private DataType SizeFromLoadStore(CapstoneArmInstruction instr)
        {
            switch (instr.Id)
            {
            case Opcode.LDR: return(PrimitiveType.Word32);

            case Opcode.LDRB: return(PrimitiveType.Byte);

            case Opcode.LDRD: return(PrimitiveType.Word64);

            case Opcode.LDRH: return(PrimitiveType.Word16);

            case Opcode.LDRSB: return(PrimitiveType.SByte);

            case Opcode.LDRSH: return(PrimitiveType.Int16);

            case Opcode.STR: return(PrimitiveType.Word32);

            case Opcode.STRB: return(PrimitiveType.Byte);

            case Opcode.STRD: return(PrimitiveType.Word64);

            case Opcode.STRH: return(PrimitiveType.Word16);
            }
            throw new NotImplementedException(instr.Id.ToString());
        }
예제 #2
0
 public Arm32Instruction(CapstoneArmInstruction instruction)
 {
     if (instruction == null)
         throw new ArgumentNullException("instruction");
     this.instruction = instruction;
     this.Address = Address.Ptr32((uint)instruction.Address);
     this.Length = instruction.Bytes.Length;
 }
예제 #3
0
 public Arm32Instruction(CapstoneArmInstruction instruction)
 {
     if (instruction == null)
     {
         throw new ArgumentNullException("instruction");
     }
     this.instruction = instruction;
     this.Address     = Address.Ptr32((uint)instruction.Address);
     this.Length      = instruction.Bytes.Length;
 }
예제 #4
0
 private RtlClass Classify(CapstoneArmInstruction instr)
 {
     throw new NotImplementedException();
 }
예제 #5
0
 /// <summary>
 /// Gets the inner, Capstone-originated instruction. If the instruction
 /// is null, it means it is invalid (ie. a garbage opcode).
 /// </summary>
 /// <param name="instr"></param>
 /// <returns>True if the instruction is valid, false otherwise.</returns>
 internal bool TryGetInternal(out CapstoneArmInstruction instr)
 {
     instr = instruction;
     return(instr != null);
 }
예제 #6
0
 private Arm32Instruction(Address addr)
 {
     this.instruction = null;
     this.Address     = addr;
     this.Length      = 2;
 }
예제 #7
0
 /// <summary>
 /// Gets the inner, Capstone-originated instruction. If the instruction
 /// is null, it means it is invalid (ie. a garbage opcode).
 /// </summary>
 /// <param name="instr"></param>
 /// <returns>True if the instruction is valid, false otherwise.</returns>
 internal bool TryGetInternal(out CapstoneArmInstruction instr)
 {
     instr = instruction;
     return instr != null;
 }
예제 #8
0
 private Arm32Instruction(Address addr)
 {
     this.instruction = null;
     this.Address = addr;
     this.Length = 2;
 }