wxLog::~wxLog() { // Flush() must be called before destroying the object as otherwise some // messages could be lost if ( gs_prevLog.numRepeated ) { wxMessageOutputDebug().Printf ( #if wxUSE_INTL wxPLURAL ( "Last repeated message (\"%s\", %lu time) wasn't output", "Last repeated message (\"%s\", %lu times) wasn't output", gs_prevLog.numRepeated ), #else wxS("Last repeated message (\"%s\", %lu time(s)) wasn't output"), #endif gs_prevLog.msg, gs_prevLog.numRepeated ); } delete m_formatter; }
bool pxAssertImpl_LogIt( const DiagnosticOrigin& origin, const wxChar *msg ) { //wxLogError( L"%s", origin.ToString( msg ).c_str() ); wxMessageOutputDebug().Printf( L"%s", origin.ToString( msg ).c_str() ); pxTrap(); return false; }
void PSFPlaylist::Selected(wxTreeEvent &event) { PSFPlaylistItem *item = dynamic_cast<PSFPlaylistItem*>(GetItemData(GetSelection())); wxASSERT_MSG(item != 0, "failed to dynamic-cast wxTreeItemData into PSFPlaylistItem"); wxMessageOutputDebug().Printf("'%s' is seledted.", item->GetFileName()); }
void CreatePatchFrame::OnClose(wxCloseEvent& evt) { { wxCriticalSectionLocker enter(m_pThreadCS); if (m_pThread) // does the thread still exist? { wxMessageOutputDebug().Printf("MYFRAME: deleting thread"); if (m_pThread->Delete() != wxTHREAD_NO_ERROR) wxLogError("Can't delete the thread!"); } } // exit from the critical section to give the thread // the possibility to enter its destructor // (which is guarded with m_pThreadCS critical section!) while (true) { { // was the ~MyThread() function executed? wxCriticalSectionLocker enter(m_pThreadCS); if (!m_pThread) break; } // wait for thread completion wxThread::This()->Sleep(1); } Destroy(); }
void wxLog::DoLogTextAtLevel(wxLogLevel level, const wxString& msg) { // we know about debug messages (because using wxMessageOutputDebug is the // right thing to do in 99% of all cases and also for compatibility) but // anything else needs to be handled in the derived class if ( level == wxLOG_Debug || level == wxLOG_Trace ) { wxMessageOutputDebug().Output(msg + wxS('\n')); } else { DoLogText(msg); } }
wxLog::~wxLog() { // Flush() must be called before destroying the object as otherwise some // messages could be lost if ( gs_prevLog.numRepeated ) { wxMessageOutputDebug().Printf ( wxS("Last repeated message (\"%s\", %lu times) wasn't output"), gs_prevLog.msg, gs_prevLog.numRepeated ); } }
void Processor::Reset() { inDelaySlot = doingBranch = false; memset(&GPR, 0, sizeof(GPR)); memset(&CP0, 0, sizeof(CP0)); PC = 0xbfc00000; // start in bootstrap /*last_code = */Cycle = Interrupt = 0; CP0.R[12] = 0x10900000; // COP0_ENABLED | BEV | TS // CP0.R[15] = 0x0000001f CP0.R[15] = 0x00000002; // PRevId = Revision Id, same as R3000A // delayed_load_target = 0; // delayed_load_value = 0; wxMessageOutputDebug().Printf(wxT("R3000A processor is reset.")); }
void Processor::Init() { inDelaySlot = false; doingBranch = false; /* GPR.AT = 0xffffff8e; GPR.V0 = 0x00000000; GPR.V1 = 0xa000e00c; GPR.A0 = 0xa000b1e0; GPR.A1 = 0x00006cc8; GPR.A2 = 0x00006cb8; GPR.A3 = 0xa000e1f4; GPR.T0 = 0x000014f8; GPR.T1 = 0x00000000; GPR.T2 = 0x000000c0; GPR.T3 = 0x00000304; GPR.T4 = 0x000000c1; GPR.T5 = 0x00000304; GPR.T6 = 0xa000e004; GPR.T7 = 0x00000008; GPR.S0 = 0x00000000; GPR.S1 = 0x00000000; GPR.S2 = 0x00000000; GPR.S3 = 0x00000000; GPR.S4 = 0x00000000; GPR.S5 = 0x00000000; GPR.S6 = 0x00000000; GPR.S7 = 0x00000000; GPR.T8 = 0x00000004; GPR.T9 = 0x00000300; GPR.K0 = 0x00000f0c; GPR.K1 = 0x00000f0c; GPR.FP = 0x801fff00; GPR.RA = 0xbfc52350; */ for (int i = 0; i < 32; i++) { R3000ARegs().GPR.R[i] = 0; } CP0.R[12] = 0x10900000; // COP0_ENABLED | BEV | TS CP0.R[15] = 0x00000002; // PRevId = Revision Id, same as R3000A wxMessageOutputDebug().Printf(wxT("Initialized R3000A processor.")); }
void wxLogStderr::DoLogText(const wxString& msg) { wxFputs(msg + '\n', m_fp); fflush(m_fp); // under GUI systems such as Windows or Mac, programs usually don't have // stderr at all, so show the messages also somewhere else, typically in // the debugger window so that they go at least somewhere instead of being // simply lost if ( m_fp == stderr ) { wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; if ( traits && !traits->HasStderr() ) { wxMessageOutputDebug().Output(msg + wxS('\n')); } } }
void wxLogStderr::DoLogText(const wxString& msg) { // First send it to stderr, even if we don't have it (e.g. in a Windows GUI // application under) it's not a problem to try to use it and it's easier // than determining whether we do have it or not. wxMessageOutputStderr(m_fp).Output(msg); // under GUI systems such as Windows or Mac, programs usually don't have // stderr at all, so show the messages also somewhere else, typically in // the debugger window so that they go at least somewhere instead of being // simply lost if ( m_fp == stderr ) { wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; if ( traits && !traits->HasStderr() ) { wxMessageOutputDebug().Output(msg + wxS('\n')); } } }
bool wxAppTraitsBase::ShowAssertDialog(const wxString& msgOriginal) { #if wxDEBUG_LEVEL wxString msg; #if wxUSE_STACKWALKER const wxString stackTrace = GetAssertStackTrace(); if ( !stackTrace.empty() ) { msg << wxT("\n\nCall stack:\n") << stackTrace; wxMessageOutputDebug().Output(msg); } #endif // wxUSE_STACKWALKER return DoShowAssertDialog(msgOriginal + msg); #else // !wxDEBUG_LEVEL wxUnusedVar(msgOriginal); return false; #endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL }
void ZLauncherFrame::OnClose(wxCloseEvent& evt) { if (evt.CanVeto() && // Check if this is not a "force close" event. !m_pThreadCS.TryEnter()) // Check if the thread is in the critical section. { wxMessageBox("The patcher is currently **applying** a patch. Please, wait until it completes.\n(It is safe to close during a download).", "Currently Applying Patch", wxOK | wxICON_WARNING, nullptr); evt.Veto(); return; } // If we entered the critical section in the above check, leave it now. m_pThreadCS.Leave(); { wxCriticalSectionLocker enter(m_pThreadCS); if (m_pThread) // does the thread still exist? { wxMessageOutputDebug().Printf("MYFRAME: deleting thread"); if (m_pThread->Delete() != wxTHREAD_NO_ERROR) wxLogError("Can't delete the thread!"); } } // exit from the critical section to give the thread // the possibility to enter its destructor // (which is guarded with m_pThreadCS critical section!) while (true) { { // was the ~MyThread() function executed? wxCriticalSectionLocker enter(m_pThreadCS); if (!m_pThread) break; } // wait for thread completion wxThread::This()->Sleep(1); } Destroy(); }