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()); }
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; }
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; }
private RtlClass Classify(CapstoneArmInstruction instr) { throw new NotImplementedException(); }
/// <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); }
private Arm32Instruction(Address addr) { this.instruction = null; this.Address = addr; this.Length = 2; }
/// <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; }