143b0f7e0SIngo Weinhold/*
243b0f7e0SIngo Weinhold * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
343b0f7e0SIngo Weinhold * Distributed under the terms of the MIT License.
443b0f7e0SIngo Weinhold */
543b0f7e0SIngo Weinhold
643b0f7e0SIngo Weinhold#include "InstructionInfo.h"
743b0f7e0SIngo Weinhold
843b0f7e0SIngo Weinhold
943b0f7e0SIngo WeinholdInstructionInfo::InstructionInfo()
1043b0f7e0SIngo Weinhold	:
1143b0f7e0SIngo Weinhold	fAddress(0),
1284ea02a0SRene Gollent	fTargetAddress(0),
1343b0f7e0SIngo Weinhold	fSize(0),
1443b0f7e0SIngo Weinhold	fType(INSTRUCTION_TYPE_OTHER),
1543b0f7e0SIngo Weinhold	fBreakpointAllowed(false),
1643b0f7e0SIngo Weinhold	fDisassembledLine()
1743b0f7e0SIngo Weinhold{
1843b0f7e0SIngo Weinhold}
1943b0f7e0SIngo Weinhold
2043b0f7e0SIngo Weinhold
2184ea02a0SRene GollentInstructionInfo::InstructionInfo(target_addr_t address,
2284ea02a0SRene Gollent	target_addr_t targetAddress, target_size_t size,
2343b0f7e0SIngo Weinhold	instruction_type type, bool breakpointAllowed,
2443b0f7e0SIngo Weinhold	const BString& disassembledLine)
2543b0f7e0SIngo Weinhold	:
2643b0f7e0SIngo Weinhold	fAddress(address),
2784ea02a0SRene Gollent	fTargetAddress(targetAddress),
2843b0f7e0SIngo Weinhold	fSize(size),
2943b0f7e0SIngo Weinhold	fType(type),
3043b0f7e0SIngo Weinhold	fBreakpointAllowed(breakpointAllowed),
3143b0f7e0SIngo Weinhold	fDisassembledLine(disassembledLine)
3243b0f7e0SIngo Weinhold{
3343b0f7e0SIngo Weinhold}
3443b0f7e0SIngo Weinhold
3543b0f7e0SIngo Weinhold
3643b0f7e0SIngo Weinholdbool
3784ea02a0SRene GollentInstructionInfo::SetTo(target_addr_t address, target_addr_t targetAddress,
3884ea02a0SRene Gollent	target_size_t size, instruction_type type, bool breakpointAllowed,
3943b0f7e0SIngo Weinhold	const BString& disassembledLine)
4043b0f7e0SIngo Weinhold{
4143b0f7e0SIngo Weinhold	fAddress = address;
4284ea02a0SRene Gollent	fTargetAddress = targetAddress;
4343b0f7e0SIngo Weinhold	fSize = size;
4443b0f7e0SIngo Weinhold	fType = type;
4543b0f7e0SIngo Weinhold	fBreakpointAllowed = breakpointAllowed;
4643b0f7e0SIngo Weinhold	fDisassembledLine = disassembledLine;
4743b0f7e0SIngo Weinhold	return disassembledLine.Length() == 0 || fDisassembledLine.Length() > 0;
4843b0f7e0SIngo Weinhold}
49