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

C++ debugger函数代码示例

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

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



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

示例1: debugger

const SudokuField::field&
SudokuField::_FieldAt(uint32 x, uint32 y) const
{
	if (x >= fSize || y >= fSize)
		debugger("field outside bounds");

	return fFields[x + y * fSize];
}
开发者ID:RTOSkit,项目名称:haiku,代码行数:8,代码来源:SudokuField.cpp


示例2: loop

// The loop function is called in an endless loop
void loop()
{
	if(serialCommand!=0){
		debugger();
		serialCommand = 0;
	}
	delay(1);
}
开发者ID:ravmiecznik,项目名称:myECUeclipse,代码行数:9,代码来源:myECU.cpp


示例3: atomic_add

void AmSafeDelete::DecRefs() const
{
	int32 last = atomic_add(&fRefCount, -1);
	if (last == 1 && fDeleted) const_cast<AmSafeDelete*>(this)->RealDelete();
	else if (last < 1) {
		debugger("AmSafeDelete reference count went below zero");
	}
}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:8,代码来源:AmSafeDelete.cpp


示例4: strcat

void i860_cpu_device::handle_trap(UINT32 savepc) {
    static char buffer[256];
    buffer[0] = 0;
    strcat(buffer, "TRAP");
    if(m_flow & TRAP_NORMAL)        strcat(buffer, " [Normal]");
    if(m_flow & TRAP_IN_DELAY_SLOT) strcat(buffer, " [Delay Slot]");
    if(m_flow & TRAP_WAS_EXTERNAL)  strcat(buffer, " [External]");
    if(!(GET_PSR_IT() || GET_PSR_FT() || GET_PSR_IAT() || GET_PSR_DAT() || GET_PSR_IN()))
        strcat(buffer, " >Reset<");
    else {
        if(GET_PSR_IT())  strcat(buffer, " >Instruction Fault<");
        if(GET_PSR_FT())  strcat(buffer, " >Floating Point Fault<");
        if(GET_PSR_IAT()) strcat(buffer, " >Instruction Access Fault<");
        if(GET_PSR_DAT()) strcat(buffer, " >Data Access Fault<");
        if(GET_PSR_IN())  strcat(buffer, " >Interrupt<");
    }
    
    if(!(m_single_stepping) && !((GET_PSR_IAT() || GET_PSR_DAT() || GET_PSR_IN())))
        debugger('d', buffer);
    
    if(m_dim)
        Log_Printf(LOG_WARN, "[i860] Trap while DIM %s pc=%08X m_flow=%08X", buffer, savepc, m_flow);

    /* If we need to trap, change PC to trap address.
     Also set supervisor mode, copy U and IM to their
     previous versions, clear IM.  */
    if(m_flow & TRAP_WAS_EXTERNAL) {
        if (GET_PC_UPDATED()) {
            m_cregs[CR_FIR] = m_pc;
        } else {
            m_cregs[CR_FIR] = savepc + 4;
        }
    }
    else if (m_flow & TRAP_IN_DELAY_SLOT) {
        m_cregs[CR_FIR] = savepc + 4;
    }
    else
        m_cregs[CR_FIR] = savepc;
    
    m_flow |= FIR_GETS_TRAP;
    SET_PSR_PU (GET_PSR_U ());
    SET_PSR_PIM (GET_PSR_IM ());
    SET_PSR_U (0);
    SET_PSR_IM (0);
    SET_PSR_DIM (0);
    SET_PSR_DS (0);
    
    m_save_flow     = m_flow & DIM_OP;
    m_save_dim      = m_dim;
    m_save_cc       = m_dim_cc;
    m_save_cc_valid = m_dim_cc_valid;
    
    m_dim           = DIM_NONE;
    m_dim_cc        = false;
    m_dim_cc_valid  = false;
    
    m_pc = 0xffffff00;
}
开发者ID:itomato,项目名称:Previous,代码行数:58,代码来源:i860.cpp


示例5: debugger

// NOTE: Set actual address, not contents of sp (esp on 6502)
void ECPU8Bit::setStack(ULONG location)
{
  ULONG val=(location-stackBase)&stackMask;
  //DEBUG_OUT<<"val="<<val<<" location="<<location<<" stackMask="<<stackMask<<" stackBase="<<stackBase<<"\n";
  sp=val;
  if(((sp&stackMask)+stackBase)!=location) {
    debugger("ECPU8Bit::setStack attempted to set out of range value");
  }
}
开发者ID:laulandne,项目名称:src,代码行数:10,代码来源:ECPU8Bit.cpp


示例6:

void CScriptEngine::stopDebugger				()
{
    if (debugger()){
        xr_delete	(m_scriptDebugger);
        Msg			("Script debugger succesfully stoped.");
    }
    else
        Msg			("Script debugger not present.");
}
开发者ID:denanden,项目名称:xray-16,代码行数:9,代码来源:script_engine.cpp


示例7: debugger

void OCamlWatch::updateWatches()
{
    variables_p->clear();
    for (QList<Watch>::Iterator itWatch = _watches.begin() ; itWatch != _watches.end() ; ++itWatch )
    {
        itWatch->uptodate = false;
        emit debugger( DebuggerCommand( command( *itWatch ), DebuggerCommand::HIDE_ALL_OUTPUT ) );
    }
}
开发者ID:modlfo,项目名称:oqamldebug_qt5,代码行数:9,代码来源:ocamlwatch.cpp


示例8: SprayEvent

void
BMidiLocalProducer::SpraySystemRealTime(uchar status,
	bigtime_t time) const
{
	if (status >= B_TIMING_CLOCK)
		SprayEvent(&status, 1, true, time);
	else
		debugger("invalid real time status");
}
开发者ID:mmanley,项目名称:Antares,代码行数:9,代码来源:MidiLocalProducer.cpp


示例9: switch

void EArm::cause_int(ULONG value)
{
  int_pending=0;
  switch(value) {
    default:
      debugger("Illegal interrupt requested!\n");
      break;
  }
}
开发者ID:laulandne,项目名称:src,代码行数:9,代码来源:EArm.cpp


示例10: debugger

void PeepsWindow::RemovePerson(PersonData *person)
{
	if(!person)
		return;

	// TODO: Implement PeepsWindow::RemovePerson
	
	debugger("PeepsWindow::RemovePerson() unimplemented");
}
开发者ID:HaikuArchives,项目名称:MrPeeps,代码行数:9,代码来源:PeepsWindow.cpp


示例11: IsTypeMatch

bool
IsTypeMatch(const BMessage &test, const entry_ref &ref)
{
	BString value;
	if (test.FindString("value",&value) != B_OK)
	{
		debugger("Couldn't get value in IsTypeMatch");
		return false;
	}

//if (value == "image/")
//	debugger("");
	
	BString compare;
	if (test.FindString("mode",&compare) != B_OK)
	{
		debugger("Couldn't get mode in IsTypeMatch");
		return false;
	}
	
	BString string;
	attr_info info;
	BNode node(&ref);
	if (node.InitCheck() != B_OK)
		return false;
	
	if (node.GetAttrInfo("BEOS:TYPE",&info) != B_OK)
	{
		BPath path(&ref);
		if (update_mime_info(path.Path(),0,1,0) != B_OK)
			return false;
	}
	
	if (node.ReadAttrString("BEOS:TYPE",&string) != B_OK)
		return false;
	
	
	bool result = StringCompare(value,string.String(),compare.String(),true);
	
	printf("\tType test: %s %s %s - %s\n",ref.name,compare.String(),value.String(),
								result ? "MATCH" : "NO MATCH");
	
	return result;
}
开发者ID:puckipedia,项目名称:Filer,代码行数:44,代码来源:RuleRunner.cpp


示例12: PIDRegulate

/*
void Omni4WD::delayMS(unsigned int ms,unsigned int slot,bool debug) {
	for(int i=0;i<ms;i+=slot) {
		PIDRegulate();
		if(debug && (i%500==0)) debugger();
		delay(slot);
	}
}
 */
void Omni4WD::delayMS(unsigned int ms,bool debug,unsigned char* actBreak) {		// 201209
	for(unsigned long endTime=millis()+ms;millis()<endTime;) 
	{
		if(actBreak) return;
		PIDRegulate();
		if(debug && (millis()%500==0)) debugger();
		if(endTime-millis()>=SAMPLETIME) delay(SAMPLETIME);
		else delay(endTime-millis());
	}
}
开发者ID:Tony-YI,项目名称:home_page,代码行数:19,代码来源:Omni4WD.cpp


示例13: fSettings

DesktopSettings::DesktopSettings(Desktop* desktop)
	:
	fSettings(desktop->fSettings)
{
#if DEBUG
	if (!desktop->fWindowLock.IsWriteLocked()
		&& !desktop->fWindowLock.IsReadLocked())
		debugger("desktop not locked when trying to access settings");
#endif
}
开发者ID:mmanley,项目名称:Antares,代码行数:10,代码来源:DesktopSettings.cpp


示例14: ir_return

void ir_return(nodeType* n)
{
	if(n->opr.nops != 0)
	{
		nodeType* return_exp = get_operand(n,0);
		generate(return_exp);
	}
	debugger("ret \n");
	fprintf(output,"ret \n");
}
开发者ID:shyamupa,项目名称:x10-compiler,代码行数:10,代码来源:ir_code.c


示例15: error

void error(const char *fmt, ...) {
    va_list va;
    va_start(va, fmt);
    gui_console_printf("Error (%06X): ", asic.cpu->registers.PC);
    gui_console_vprintf(fmt, va);
    gui_console_printf("\n");
    va_end(va);
    debugger(DBG_EXCEPTION, 0);
    cpu_events |= EVENT_RESET;
}
开发者ID:Vogtinator,项目名称:CEmu,代码行数:10,代码来源:emu.cpp


示例16: insert_signature

void insert_signature(nodeType* fun_name,nodeType* formalarg,nodeType* return_type)
{
	debugger("DOING SIGNATURE\n");
	if(fun_name==NULL || return_type==NULL)
			yyerror("function name or return type not in symbol table");
	else
	{	
		memset(fun_name->id.symrec->signature,0,100);
		switch(return_type->con_i.value)
		{
			case MY_INT:
						strcat(fun_name->id.symrec->signature,"int32 ");
						break;
			case MY_FLOAT:
						strcat(fun_name->id.symrec->signature,"float32 ");
						break;			
			case MY_VOID:
						strcat(fun_name->id.symrec->signature,"void ");
						break;			
		}
		strcat(fun_name->id.symrec->signature,"class ");
		strcat(fun_name->id.symrec->signature,fun_name->id.symrec->my_st->parent->owner_name);
		strcat(fun_name->id.symrec->signature,"::");
		if(strcmp(fun_name->id.symrec->my_st->parent->owner_name,fun_name->id.symrec->sym_name)==0)
		{
			strcat(fun_name->id.symrec->signature,"'.ctor'");
		}
		else
		{
			strcat(fun_name->id.symrec->signature,fun_name->id.symrec->sym_name);
		}	
		strcat(fun_name->id.symrec->signature," ( ");
		
		memset(mybuf,0,100);
		create_formal_args(formalarg);
		
		strcat(fun_name->id.symrec->signature,mybuf);
		memset(mybuf,0,100);
		strcat(fun_name->id.symrec->signature," ) ");
		
		debugger("FINAL SIGNATURE:%s\n",fun_name->id.symrec->signature);
	}	
}
开发者ID:shyamupa,项目名称:x10-compiler,代码行数:43,代码来源:ir_code.c


示例17: ir_finish

void ir_finish(nodeType* n)
{
	//the first child node of n would be a ASYNC_LIST node or ASYNC node...
	debugger("In finish\n");
	nodeType* async_stmt_list = get_operand(n,0);
	char thread_id[16];
	memset(thread_id,0,16);
	if(async_stmt_list->opr.oper == ASYNC)
		{
			debugger("single async in finish\n");
			strcpy(thread_id,ir_async(async_stmt_list));
			debugger("ldloc %s\n",thread_id); 
			fprintf(output,"ldloc %s\n",thread_id); 
			//the below lines perform thread.join operation of the thread just started
			debugger("callvirt instance void class [mscorlib]System.Threading.Thread::Join()\n");
			fprintf(output,"callvirt instance void class [mscorlib]System.Threading.Thread::Join()\n");
		}
	else generate(async_stmt_list);
}	
开发者ID:shyamupa,项目名称:x10-compiler,代码行数:19,代码来源:ir_code.c


示例18: test_gart

void
test_gart()
{
	addr_t apertureBase;
	aperture_id aperture = sGART->map_aperture(0, 0, 0, 0, &apertureBase);
	printf("Map Aperture: %ld, base %lx\n", aperture, apertureBase);

	aperture_info info;
	sGART->get_aperture_info(aperture, &info);
	printf("Aperture: base %lx, physical base %lx, size %ld, reserved %ld\n",
		info.base, info.physical_base, info.size, info.reserved_size);

	addr_t base[5], physical[5];
	allocate(aperture, 2 * B_PAGE_SIZE, 0, 0, base[0], physical[0]);
	allocate(aperture, 4 * B_PAGE_SIZE, 0, B_APERTURE_NON_RESERVED, base[1], physical[1]);
	allocate(aperture, 1 * B_PAGE_SIZE, 0, B_APERTURE_NEED_PHYSICAL, base[2], physical[2]);
	sGART->deallocate_memory(aperture, base[2]);
	allocate(aperture, 1 * B_PAGE_SIZE, 4 * B_PAGE_SIZE, 0, base[2], physical[2]);

	sGART->deallocate_memory(aperture, base[1]);

	allocate(aperture, 5 * B_PAGE_SIZE, 0, 0, base[1], physical[1]);

	sGART->deallocate_memory(aperture, base[2]);
	sGART->deallocate_memory(aperture, base[0]);
	if (sGART->deallocate_memory(aperture, 0x12345) == B_OK)
		debugger("Non-allocated succeeded to be freed!\n");

	void *buffer = memalign(3 * B_PAGE_SIZE, B_PAGE_SIZE);
	status_t status = sGART->bind_aperture(aperture, -1, (addr_t)buffer,
		3 * B_PAGE_SIZE, 0, false, 0, &base[3]);
	if (status < B_OK)
		printf("binding memory failed: %s\n", strerror(status));

	allocate(aperture, 25 * B_PAGE_SIZE, 0, 0, base[0], physical[0]);
		// will fail
	allocate(aperture, 4 * B_PAGE_SIZE, 0, 0, base[0], physical[0]);

	void *address;
	area_id area = create_area("test", &address, B_ANY_ADDRESS, 2 * B_PAGE_SIZE,
		B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
	printf("Area %ld, address %p\n", area, address);
	status = sGART->bind_aperture(aperture, area, 0, 0, 0, false, 0, &base[4]);
	if (status < B_OK)
		printf("binding area failed: %s\n", strerror(status));

	sGART->unbind_aperture(aperture, base[3]);
	sGART->unbind_aperture(aperture, base[4]);
//	sGART->deallocate_memory(aperture, base[0]);

	free(buffer);
	delete_area(area);

	sGART->unmap_aperture(aperture);
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:55,代码来源:gart_tester.cpp


示例19: debugger

void CDbgLuaHelper::DrawStackTrace()
{
    debugger()->ClearStackTrace();

    int nLevel = 0;
    lua_Debug ar;
    char szDesc[256];
    while ( lua_getstack (L, nLevel, &ar) )
    {
        lua_getinfo(L, "lnuS", &ar);
        if ( ar.source[0]=='@' )
        {
            szDesc[0] = '\0';
            /*			if ( ar.name )
            				strcat(szDesc, ar.name);
            			strcat(szDesc, ",");
            			if ( ar.namewhat )
            				strcat(szDesc, ar.namewhat);
            			strcat(szDesc, ",");
            			if ( ar.what )
            				strcat(szDesc, ar.what);
            			strcat(szDesc, ",");
            */
            if ( ar.name ) {
                strcat(szDesc, ar.name);
                strcat(szDesc, " ");
            }

            char szTmp[6];

            strcat(szDesc, itoa(ar.currentline,szTmp,10));
            strcat(szDesc, " ");

            if ( ar.short_src )
                strcat(szDesc, ar.short_src);

            debugger()->AddStackTrace(szDesc, ar.source+1, ar.currentline);
        }

        ++nLevel;
    };
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:42,代码来源:script_lua_helper.cpp


示例20: debugger

status_t
DVBMediaAddon::InitCheck(const char ** out_failure_text)
{
	debugger("");
	if (!fDeviceList.CountItems()) {
		*out_failure_text = "No supported device found";
		return B_ERROR;
	}

	return B_OK;
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:11,代码来源:DVBMediaAddon.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ debugger_instruction_hook函数代码示例发布时间:2022-05-30
下一篇:
C++ debugfs_create_u32函数代码示例发布时间: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