当前位置: 首页>>代码示例>>C++>>正文


C++ CtrlDisAsmView::getWindowEnd方法代码示例

本文整理汇总了C++中CtrlDisAsmView::getWindowEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ CtrlDisAsmView::getWindowEnd方法的具体用法?C++ CtrlDisAsmView::getWindowEnd怎么用?C++ CtrlDisAsmView::getWindowEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CtrlDisAsmView的用法示例。


在下文中一共展示了CtrlDisAsmView::getWindowEnd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: stepOver

void CDisasm::stepOver()
{
	if (Core_IsActive()) return;
	
	CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
	lastTicks = CoreTiming::GetTicks();

	// If the current PC is on a breakpoint, the user doesn't want to do nothing.
	CBreakPoints::SetSkipFirst(currentMIPS->pc);
	u32 currentPc = cpu->GetPC();
	u32 windowEnd = ptr->getWindowEnd();

	MIPSAnalyst::MipsOpcodeInfo info = MIPSAnalyst::GetOpcodeInfo(cpu,cpu->GetPC());
	ptr->setDontRedraw(true);
	u32 breakpointAddress = currentPc+cpu->getInstructionSize(0);
	if (info.isBranch)
	{
		if (info.isConditional == false)
		{
			if (info.isLinkedBranch)	// jal, jalr
			{
				// it's a function call with a delay slot - skip that too
				breakpointAddress += cpu->getInstructionSize(0);
			} else {					// j, ...
				// in case of absolute branches, set the breakpoint at the branch target
				breakpointAddress = info.branchTarget;
			}
		} else {						// beq, ...
			if (info.conditionMet)
			{
				breakpointAddress = info.branchTarget;
			} else {
				breakpointAddress = currentPc+2*cpu->getInstructionSize(0);
				if (breakpointAddress == windowEnd-4)
					ptr->scrollWindow(1);
				else if (breakpointAddress == windowEnd)
					ptr->scrollWindow(2);
				else if (breakpointAddress == windowEnd+4)
					ptr->scrollWindow(3);
			}
		}
	} else {
		if (breakpointAddress == windowEnd-4)
			ptr->scrollWindow(1);
		else if (breakpointAddress == windowEnd)
			ptr->scrollWindow(2);
	}

	SetDebugMode(false, true);
	CBreakPoints::AddBreakPoint(breakpointAddress,true);
	_dbg_update_();
	Core_EnableStepping(false);
	Sleep(1);
	ptr->gotoAddr(breakpointAddress);
	UpdateDialog();
}
开发者ID:andont,项目名称:ppsspp,代码行数:56,代码来源:Debugger_Disasm.cpp

示例2: stepInto

void CDisasm::stepInto()
{
	if (!Core_IsStepping()) return;

	CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
	lastTicks = CoreTiming::GetTicks();
	u32 currentPc = cpu->GetPC();
	u32 windowEnd = ptr->getWindowEnd();

	// If the current PC is on a breakpoint, the user doesn't want to do nothing.
	CBreakPoints::SetSkipFirst(currentMIPS->pc);
	u32 newAddress = currentPc+cpu->getInstructionSize(0);

	MIPSAnalyst::MipsOpcodeInfo info = MIPSAnalyst::GetOpcodeInfo(cpu,currentPc);
	if (info.isBranch)
	{
		if (newAddress == windowEnd-4)
			ptr->scrollWindow(1);
		else if (newAddress == windowEnd)
			ptr->scrollWindow(2);
	} else {
		bool scroll = true;
		if (currentMIPS->inDelaySlot)
		{
			MIPSAnalyst::MipsOpcodeInfo prevInfo = MIPSAnalyst::GetOpcodeInfo(cpu,currentPc-cpu->getInstructionSize(0));
			if (!prevInfo.isConditional || prevInfo.conditionMet)
				scroll = false;
		}

		if (scroll)
		{
			if (newAddress == windowEnd-4)
				ptr->scrollWindow(1);
			else if (newAddress == windowEnd)
				ptr->scrollWindow(2);
		}
	}

	Core_DoSingleStep();		
	Sleep(1);
	_dbg_update_();
	ptr->gotoPC();
	UpdateDialog();
	vfpudlg->Update();

	CtrlMemView::getFrom(GetDlgItem(m_hDlg,IDC_DEBUGMEMVIEW))->redraw();
	threadList->reloadThreads();
	stackTraceView->loadStackTrace();
	updateThreadLabel(false);
}
开发者ID:andont,项目名称:ppsspp,代码行数:50,代码来源:Debugger_Disasm.cpp


注:本文中的CtrlDisAsmView::getWindowEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。