• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ debugger_instruction_hook函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: while

void pdp8_device::execute_run()
{
	while (m_icount > 0)
	{
		m_pc &= 07777;

		debugger_instruction_hook(this, m_pc);

		UINT16 op = m_program->read_word(m_pc);

		--m_icount;
	}
}
开发者ID:DragonMinded,项目名称:mame,代码行数:13,代码来源:pdp8.cpp


示例17: cycles_passed

void lr35902_cpu_device::execute_run()
{
	do
	{
		if (m_dma_cycles_to_burn > 0)
		{
			if (m_dma_cycles_to_burn < 4)
			{
				cycles_passed(m_dma_cycles_to_burn);
				m_dma_cycles_to_burn = 0;
			}
			else
			{
				cycles_passed(4);
				m_dma_cycles_to_burn -= 4;
			}
		}
		else
		{
			if ( m_execution_state ) {
				uint8_t   x;
				/* Execute instruction */
				switch( m_op ) {
#include "opc_main.hxx"
					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 */
				bool was_halted = (m_enable & HALTED);
				check_interrupts();
				debugger_instruction_hook(m_PC);
				if ( m_enable & HALTED ) {
					cycles_passed(m_has_halt_bug ? 2 : 4);
					m_execution_state = 1;
					m_entering_halt = false;
				} else {
					if (was_halted) {
						m_PC++;
					} else {
						m_op = mem_read_byte( m_PC++ );
					}
				}
			}
			m_execution_state ^= 1;
		}
	} while (m_icount > 0);
}
开发者ID:Dagarman,项目名称:mame,代码行数:50,代码来源:lr35902.cpp


示例18: CPU_EXECUTE

static CPU_EXECUTE( m6502 )
{
	m6502_Regs *cpustate = get_safe_token(device);

	do
	{
		UINT8 op;
		PPC = PCD;

		debugger_instruction_hook(device, PCD);

		/* if an irq is pending, take it now */
		if( cpustate->pending_irq )
			m6502_take_irq(cpustate);

		op = RDOP();
		(*cpustate->insn[op])(cpustate);

		/* check if the I flag was just reset (interrupts enabled) */
		if( cpustate->after_cli )
		{
			LOG(("M6502 '%s' after_cli was >0", cpustate->device->tag()));
			cpustate->after_cli = 0;
			if (cpustate->irq_state != CLEAR_LINE)
			{
				LOG((": irq line is asserted: set pending IRQ\n"));
				cpustate->pending_irq = 1;
			}
			else
			{
				LOG((": irq line is clear\n"));
			}
		}
		else {
			if ( cpustate->pending_irq == 2 ) {
				if ( cpustate->int_occured - cpustate->icount > 1 ) {
					cpustate->pending_irq = 1;
				}
			}
			if( cpustate->pending_irq == 1 )
				m6502_take_irq(cpustate);
			if ( cpustate->pending_irq == 2 ) {
				cpustate->pending_irq = 1;
			}
		}

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


示例19: CPU_EXECUTE

static CPU_EXECUTE( h6280 )
{
	int in;
	h6280_Regs* cpustate = get_safe_token(device);

	if ( cpustate->irq_pending == 2 ) {
		cpustate->irq_pending--;
	}

	/* Execute instructions */
	do
    {
		cpustate->ppc = cpustate->pc;

		debugger_instruction_hook(device, PCW);

		/* Execute 1 instruction */
		in=RDOP();
		PCW++;
		insnh6280[in](cpustate);

		if ( cpustate->irq_pending ) {
			if ( cpustate->irq_pending == 1 ) {
				if ( !(P & _fI) ) {
					cpustate->irq_pending--;
					CHECK_AND_TAKE_IRQ_LINES;
				}
			} else {
				cpustate->irq_pending--;
			}
		}

		/* Check internal timer */
		if(cpustate->timer_status)
		{
			if(cpustate->timer_value<=0)
			{
				if ( ! cpustate->irq_pending )
					cpustate->irq_pending = 1;
				while( cpustate->timer_value <= 0 )
					cpustate->timer_value += cpustate->timer_load;
				set_irq_line(cpustate, 2,ASSERT_LINE);
			}
		}
	} while (cpustate->ICount > 0);
}
开发者ID:johkelly,项目名称:MAME_hi,代码行数:46,代码来源:h6280.c


示例20: CPU_EXECUTE

static CPU_EXECUTE( lh5801 )
{
	lh5801_state *cpustate = get_safe_token(device);

	if (cpustate->idle) {
		cpustate->icount=0;
	} else {
		do
		{
			cpustate->oldpc = P;

			debugger_instruction_hook(device, P);
			lh5801_instruction(cpustate);

		} while (cpustate->icount > 0);
	}
}
开发者ID:johkelly,项目名称:MAME_hi,代码行数:17,代码来源:lh5801.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ debugl1函数代码示例发布时间:2022-05-30
下一篇:
C++ debugger函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap