1/* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6#include "InstructionInfo.h" 7 8 9InstructionInfo::InstructionInfo() 10 : 11 fAddress(0), 12 fTargetAddress(0), 13 fSize(0), 14 fType(INSTRUCTION_TYPE_OTHER), 15 fBreakpointAllowed(false), 16 fDisassembledLine() 17{ 18} 19 20 21InstructionInfo::InstructionInfo(target_addr_t address, 22 target_addr_t targetAddress, target_size_t size, 23 instruction_type type, bool breakpointAllowed, 24 const BString& disassembledLine) 25 : 26 fAddress(address), 27 fTargetAddress(targetAddress), 28 fSize(size), 29 fType(type), 30 fBreakpointAllowed(breakpointAllowed), 31 fDisassembledLine(disassembledLine) 32{ 33} 34 35 36bool 37InstructionInfo::SetTo(target_addr_t address, target_addr_t targetAddress, 38 target_size_t size, instruction_type type, bool breakpointAllowed, 39 const BString& disassembledLine) 40{ 41 fAddress = address; 42 fTargetAddress = targetAddress; 43 fSize = size; 44 fType = type; 45 fBreakpointAllowed = breakpointAllowed; 46 fDisassembledLine = disassembledLine; 47 return disassembledLine.Length() == 0 || fDisassembledLine.Length() > 0; 48} 49