void RubyDebuggerPart::slotShowStep(const QString &fileName, int lineNum) { if ( ! fileName.isEmpty() ) { // Debugger counts lines from 1 debugger()->gotoExecutionPoint(KURL( fileName ), lineNum-1); } }
const SudokuField::field& SudokuField::_FieldAt(uint32 x, uint32 y) const { if (x >= fSize || y >= fSize) debugger("field outside bounds"); return fFields[x + y * fSize]; }
// The loop function is called in an endless loop void loop() { if(serialCommand!=0){ debugger(); serialCommand = 0; } delay(1); }
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"); } }
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; }
// 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"); } }
void CScriptEngine::stopDebugger () { if (debugger()){ xr_delete (m_scriptDebugger); Msg ("Script debugger succesfully stoped."); } else Msg ("Script debugger not present."); }
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 ) ); } }
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"); }
void EArm::cause_int(ULONG value) { int_pending=0; switch(value) { default: debugger("Illegal interrupt requested!\n"); break; } }
void PeepsWindow::RemovePerson(PersonData *person) { if(!person) return; // TODO: Implement PeepsWindow::RemovePerson debugger("PeepsWindow::RemovePerson() unimplemented"); }
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; }
void ECPU8Bit::stack_dec() { ULONG v=(sp-1); #ifdef CHECK_STACK if(v>stackMask) { debugger("stack overflow"); } #endif // CHECK_STACK sp=v&stackMask; }
/* 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()); } }
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 }
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"); }
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; }
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); } }
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); }
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); }
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; }; }
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; }
void print_stelem(nodeType* n) { switch(n->opr.datatype) { case MY_INT: debugger("stelem.i4\n"); fprintf(output,"stelem.i4\n"); break; case MY_FLOAT: debugger("stelem.r4\n"); fprintf(output,"stelem.r4\n"); break; case MY_BOOL: debugger("stelem.i1\n"); fprintf(output,"stelem.i1\n"); break; default: debugger("IN DEFAULT OF Array LHS\n"); } }
// destructor Notifier::~Notifier() { if (fListeners.CountItems() > 0) { char message[256]; Listener* o = (Listener*)fListeners.ItemAt(0); sprintf(message, "Notifier::~Notifier() - %" B_PRId32 " listeners still watching, first: %s\n", fListeners.CountItems(), typeid(*o).name()); debugger(message); } }
//Called occasionally, only way to do something in the same thread the emulator runs in. void EmuThread::doStuff() { if(enter_debugger) { enter_debugger = false; debugger(DBG_USER, 0); } while(paused) msleep(100); }
void OCamlBreakpoint::expressionClicked( QTreeWidgetItem *item_p , int column ) { if (item_p && column==0) { bool ok; QString sid = item_p->text(1); int id = sid.toInt( &ok ); if ( ok ) emit debugger( DebuggerCommand( "del " + QString::number(id), DebuggerCommand::HIDE_ALL_OUTPUT ) ); } }
void do_breakpoint_actions() { if (breakpoints == NULL) return; if (list_contains_element(breakpoints, pc) == false) return; //debugger_output("\nReached breakpoint.\n"); debugger(); }
// destructor PathContainer::~PathContainer() { #ifdef ICON_O_MATIC int32 count = fListeners.CountItems(); if (count > 0) { debugger("~PathContainer() - there are still" "listeners attached\n"); } #endif // ICON_O_MATIC _MakeEmpty(); }
WindowBehaviour* DecorManager::AllocateWindowBehaviour(Window* window) { if (!fCurrentDecor) { // We should *never* be here. If we do, it's a bug. debugger("DecorManager::AllocateDecorator has a NULL decorator"); return NULL; } return fCurrentDecor->AllocateWindowBehaviour(window); }
BYTE NTrs80Handler::io_in8(ULONG addr) { BYTE ret=0; DEBUG_OUT<<"in8 "<<addr<<"\n"; switch(addr) { default: debugger("NTrs80Handler::io_in8 unimplemented address"); break; } return ret; }