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


C++ debugger_instruction_hook函数代码示例

本文整理汇总了C++中debugger_instruction_hook函数的典型用法代码示例。如果您正苦于以下问题:C++ debugger_instruction_hook函数的具体用法?C++ debugger_instruction_hook怎么用?C++ debugger_instruction_hook使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: check_irq_lines

void m6809_base_device::execute_run()
{
	m_icount -= m_extra_cycles;
	m_extra_cycles = 0;

	check_irq_lines();

	if (m_int_state & (M6809_CWAI | M6809_SYNC))
	{
		debugger_instruction_hook(this, PCD);
		m_icount = 0;
	}
	else
	{
		do
		{
			pPPC = pPC;

			debugger_instruction_hook(this, PCD);

			m_ireg = ROP(PCD);
			PC++;
			(this->*m_opcode[m_ireg])();
			m_icount -= m_cycles1[m_ireg];

		} while( m_icount > 0 );

		m_icount -= m_extra_cycles;
		m_extra_cycles = 0;
	}
}
开发者ID:opicron,项目名称:mame,代码行数:31,代码来源:m6809.c

示例2: CPU_EXECUTE

/* execute instructions on this CPU until icount expires */
static CPU_EXECUTE( m6809 )	/* NS 970908 */
{
	m68_state_t *m68_state = get_safe_token(device);

    m68_state->icount -= m68_state->extra_cycles;
	m68_state->extra_cycles = 0;

	check_irq_lines(m68_state);

	if (m68_state->int_state & (M6809_CWAI | M6809_SYNC))
	{
		debugger_instruction_hook(device, PCD);
		m68_state->icount = 0;
	}
	else
	{
		do
		{
			pPPC = pPC;

			debugger_instruction_hook(device, PCD);

			m68_state->ireg = ROP(PCD);
			PC++;
        	(*m6809_main[m68_state->ireg])(m68_state);
			m68_state->icount -= cycles1[m68_state->ireg];

		} while( m68_state->icount > 0 );

        m68_state->icount -= m68_state->extra_cycles;
		m68_state->extra_cycles = 0;
    }
}
开发者ID:NastyNoah,项目名称:groovyarcade.groovymame,代码行数:34,代码来源:m6809.c

示例3: debugger_instruction_hook

void nec_common_device::execute_run()
{
	int prev_ICount;

	if (m_halted)
	{
		m_icount = 0;
		debugger_instruction_hook(this, (Sreg(PS)<<4) + m_ip);
		return;
	}

	while(m_icount>0) {
		/* Dispatch IRQ */
		if (m_pending_irq && m_no_interrupt==0)
		{
			if (m_pending_irq & NMI_IRQ)
				external_int();
			else if (m_IF)
				external_int();
		}

		/* No interrupt allowed between last instruction and this one */
		if (m_no_interrupt)
			m_no_interrupt--;

		debugger_instruction_hook(this, (Sreg(PS)<<4) + m_ip);
		prev_ICount = m_icount;
		(this->*s_nec_instruction[fetchop()])();
		do_prefetch(prev_ICount);
	}
}
开发者ID:RalfVB,项目名称:mame,代码行数:31,代码来源:nec.cpp

示例4: CPU_EXECUTE

static CPU_EXECUTE( necv )
{
	nec_state_t *nec_state = get_safe_token(device);
	int prev_ICount;

	if (nec_state->halted)
	{
		nec_state->icount = 0;
		debugger_instruction_hook(device, (Sreg(PS)<<4) + nec_state->ip);
		return;
	}

	while(nec_state->icount>0) {
		/* Dispatch IRQ */
		if (nec_state->pending_irq && nec_state->no_interrupt==0)
		{
			if (nec_state->pending_irq & NMI_IRQ)
				external_int(nec_state);
			else if (nec_state->IF)
				external_int(nec_state);
		}

		/* No interrupt allowed between last instruction and this one */
		if (nec_state->no_interrupt)
			nec_state->no_interrupt--;

		debugger_instruction_hook(device, (Sreg(PS)<<4) + nec_state->ip);
		prev_ICount = nec_state->icount;
		nec_instruction[fetchop(nec_state)](nec_state);
		do_prefetch(nec_state, prev_ICount);
	}
}
开发者ID:opicron,项目名称:mame,代码行数:32,代码来源:nec.c

示例5: CPU_EXECUTE

static CPU_EXECUTE( sc61860 )
{
    sc61860_state *cpustate = get_safe_token(device);

    do
    {
        cpustate->oldpc = cpustate->pc;

        debugger_instruction_hook(device, cpustate->pc);

        sc61860_instruction(cpustate);

#if 0
        /* Are we in HLT-mode? */
        if (cpustate->c & 4)
        {
            if ((cpustate->config && cpustate->config->ina && (cpustate->config->ina(cpustate)!=0)) || cpustate->timer.t512ms)
            {
                cpustate->c&=0xfb;
                if (cpustate->config->outc) cpustate->config->outc(cpustate->c);
            }
            cpustate->icount-=4;
        }
        else if(cpustate->c & 8) {}

        else sc61860_instruction(cpustate);
#endif

    } while (cpustate->icount > 0);
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:30,代码来源:sc61860.c

示例6: debugger_instruction_hook

void minx_cpu_device::execute_run()
{
	do
	{
		m_curpc = GET_MINX_PC;
		debugger_instruction_hook(this, m_curpc);

		if ( m_interrupt_pending )
		{
			m_halted = 0;
			if ( ! ( m_F & 0xc0 ) && m_U == m_V )
			{
				//logerror("minx_execute(): taking IRQ\n");
				PUSH8( m_V );
				PUSH16( m_PC );
				PUSH8( m_F );

				/* Set Interrupt Branch flag */
				m_F |= 0x80;
				m_V = 0;
				m_PC = rd16( standard_irq_callback( 0 ) << 1 );
				m_icount -= 28;     /* This cycle count is a guess */
			}
		}

		if ( m_halted )
		{
			m_icount -= insnminx_cycles_CE[0xAE];
		}
		else
		{
			execute_one();
		}
	} while ( m_icount > 0 );
}
开发者ID:Robbbert,项目名称:store1,代码行数:35,代码来源:minx.cpp

示例7: CPU_EXECUTE

static CPU_EXECUTE( t11 )
{
	t11_state *cpustate = get_safe_token(device);

	t11_check_irqs(cpustate);

	if (cpustate->wait_state)
	{
		cpustate->icount = 0;
		goto getout;
	}

	do
	{
		UINT16 op;

		cpustate->ppc = cpustate->reg[7];	/* copy PC to previous PC */

		debugger_instruction_hook(device, cpustate->PCD);

		op = ROPCODE(cpustate);
		(*opcode_table[op >> 3])(cpustate, op);

	} while (cpustate->icount > 0);

getout:
	;
}
开发者ID:DarrenBranford,项目名称:MAME4iOS,代码行数:28,代码来源:t11.c

示例8: switch

void lr35902_cpu_device::execute_run()
{
	do
	{
		if ( m_execution_state ) {
			UINT8   x;
			/* Execute instruction */
			switch( m_op ) {
#include "opc_main.inc"
				default:
					// actually this should lock up the cpu!
					logerror("LR35902: Illegal opcode $%02X @ %04X\n", m_op, m_PC);
					break;
			}
		} else {
			/* Fetch and count cycles */
			check_interrupts();
			debugger_instruction_hook(this, m_PC);
			if ( m_enable & HALTED ) {
				cycles_passed( 4 );
				m_execution_state = 1;
			} else {
				m_op = mem_read_byte( m_PC++ );
				if ( m_handle_halt_bug ) {
					m_PC--;
					m_handle_halt_bug = false;
				}
			}
		}
		m_execution_state ^= 1;
	} while (m_icount > 0);
}
开发者ID:crazii,项目名称:mameplus,代码行数:32,代码来源:lr35902.c

示例9: CPU_EXECUTE

/* execute instructions on this CPU until icount expires */
static CPU_EXECUTE( konami )
{
	konami_state *cpustate = get_safe_token(device);

	check_irq_lines(cpustate);

	if( cpustate->int_state & (KONAMI_CWAI | KONAMI_SYNC) )
	{
		cpustate->icount = 0;
	}
	else
	{
		do
		{
			UINT8 ireg;

			pPPC = pPC;

			debugger_instruction_hook(device, PCD);

			cpustate->ireg = ireg = ROP(cpustate, PCD);
			PC++;

            (*konami_main[ireg])(cpustate);

            cpustate->icount -= cycles1[ireg];

        } while( cpustate->icount > 0 );
    }
}
开发者ID:bji,项目名称:libmame,代码行数:31,代码来源:konami.c

示例10: debugger_instruction_hook

inline void cosmac_device::debug()
{
	if (device_t::machine().debug_flags & DEBUG_FLAG_ENABLED)
	{
		debugger_instruction_hook(this, R[P]);
	}
}
开发者ID:BrandoCommando,项目名称:mame,代码行数:7,代码来源:cosmac.c

示例11: switch

void lr35902_cpu_device::execute_run()
{
	do
	{
		if ( m_execution_state ) {
			UINT8   x;
			/* Execute instruction */
			switch( m_op ) {
#include "opc_main.h"
			}
		} else {
			/* Fetch and count cycles */
			check_interrupts();
			debugger_instruction_hook(this, m_PC);
			if ( m_enable & HALTED ) {
				cycles_passed( 4 );
				m_execution_state = 1;
			} else {
				m_op = mem_read_byte( m_PC++ );
				if ( m_doHALTbug ) {
					m_PC--;
					m_doHALTbug = 0;
				}
			}
		}
		m_execution_state ^= 1;
	} while (m_icount > 0);
}
开发者ID:opicron,项目名称:mame,代码行数:28,代码来源:lr35902.c

示例12: debugger_instruction_hook

void dsp16_device::execute_run()
{
	// HACK TO MAKE CPU DO NOTHING.
	// REMOVE IF DEVELOPING CPU CORE.
	m_icount = 0;
	return;

	do
	{
		// debugging
		m_ppc = m_pc;   // copy PC to previous PC
		debugger_instruction_hook(this, m_pc);

		// instruction fetch & execute
		UINT8 cycles;
		UINT8 pcAdvance;
		const UINT16 op = opcode_read();
		execute_one(op, cycles, pcAdvance);

		// step
		m_pc += pcAdvance;
		m_icount -= cycles;

		// The 16 bit PI "shadow" register gets set to PC on each instruction except
		// when an interrupt service routine is active (TODO: Interrupt check)  (page 2-4)
		m_pi = m_pc;

	} while (m_icount > 0);
}
开发者ID:AreaScout,项目名称:mame-libretro,代码行数:29,代码来源:dsp16.c

示例13: while

void tms32082_mp_device::execute_run()
{
	while (m_icount > 0)
	{
		m_pc = m_fetchpc;

		check_interrupts();

		debugger_instruction_hook(this, m_pc);

		m_ir = fetch();
		execute();

		m_tcount--;
		if (m_tcount < 0)
		{
			// TODO: timer interrupt
			m_tcount = m_tscale;
		}

		m_icount--;
	};

	return;
}
开发者ID:Robbbert,项目名称:store1,代码行数:25,代码来源:tms32082.cpp

示例14: debugger_instruction_hook

void tms32082_mp_device::delay_slot()
{
	debugger_instruction_hook(this, m_pc);
	m_ir = fetch();
	execute();

	m_icount--;
}
开发者ID:Robbbert,项目名称:store1,代码行数:8,代码来源:tms32082.cpp

示例15: while

void alpha_device::execute_run()
{
	while (m_icount > 0)
	{
		debugger_instruction_hook(m_pc);

		m_icount--;
	}
}
开发者ID:k2-git,项目名称:mame,代码行数:9,代码来源:alpha.cpp


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