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


C++ Breakpoint::GetAddress方法代码示例

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


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

示例1: if

bool Core65c02::Execute (unsigned int count)
{
  bool hit_breakpoint = false;
  Breakpoint * bp = 0;

  unbuild_P(P);

  while (count && !hit_breakpoint)
    {
      --count;

      /* check for interrupts */
      if (interrupt_flags)
	{
	  if ((I == 0) && (interrupt_flags & F_IRQ))
	    interrupt(IRQ_VECTOR, F_IRQ);
	  else if (interrupt_flags & F_NMI)
	    interrupt(NMI_VECTOR, F_NMI);
	  else if (interrupt_flags & F_RESET)
	    interrupt(RES_VECTOR, F_RESET);
	  else if ((I==0) && (interrupt_flags & F_PAD_A_IRQ))
      {
        printf("got keyboard interrupt\n");
        interrupt(PAD_A_IRQ_VECTOR, F_PAD_A_IRQ);
      }
	}

      /* fetch, decode, and execute and instruction */
      opcode = READ(emPC); ++emPC;
      EXECUTE(opcode);
      ++num_instructions;

      /* tick the clock for interested parties */
      if (num_clockusers != 0)
	{
	  unsigned long long time = 1000000000;
	  time = (time * cycle_clock) / frequency;

	  for (int idx = 0; idx < num_clockusers; ++idx)
	    clockuser[idx]->TellTime(time);
	}

      /* check for encountered breakpoints */
      int nbkpts = bpm->NumBreakpoints();

      if (nbkpts != 0)
	{
	  /* must count down (not up) because of automatic breakpoint deletion */
	  while (nbkpts--)
	    {
	      bp = bpm->GetBreakpointAtIndex(nbkpts);

	      if (bp->IsEnabled() == false)
		continue;

	      if (bp->GetOperandFlags() == bp_PC)
		{
		  if (bp->GetConditionFlags() == bp_equal)
		    if (bp->GetAddress() == emPC)
		      {
			hit_breakpoint = true;
			if (bp->IsAutomatic())
			  bpm->DeleteBreakpoint(bp);
		      }
		}
	      else if (bp->GetOperandFlags() == bp_S)
		{
		  if (bp->GetConditionFlags() == bp_equal)
		    if (bp->GetValue() == S)
		      {
			hit_breakpoint = true;
			if (bp->IsAutomatic())
			  bpm->DeleteBreakpoint(bp);
		      }
		}
	    }
	}
    }

  P = build_P();

  return hit_breakpoint;
}
开发者ID:cwolsen7905,项目名称:photokeychain,代码行数:83,代码来源:Core65c02.cpp


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