void DisassemblyTextCtrl::SyncEditor(const wxString& filename, int line, bool setMarker) /// { if (setMarker) ClearActiveMarkFromAllEditors(); // wxString testfile(filename); FileType ft = FileTypeOf(filename); if (ft != ftSource && ft != ftHeader && ft != ftResource) return; // don't try to open unknown files cbProject* project = Manager::Get()->GetProjectManager()->GetActiveProject(); ProjectFile* f = project ? project->GetFileByFilename(filename, false, true) : 0; wxFileName fname(filename); if (project && fname.IsRelative()) fname.MakeAbsolute(project->GetBasePath()); // gdb can't work with spaces in filenames, so we have passed it the shorthand form (C:\MYDOCU~1 etc) // revert this change now so the file can be located and opened... // we do this by calling GetLongPath() cbEditor* ed = Manager::Get()->GetEditorManager()->Open(fname.GetLongPath()); if (ed) { ed->Show(true); if (f && !ed->GetProjectFile()) ed->SetProjectFile(f); ed->GotoLine(line - 1, false); if (setMarker) { ed->SetDebugLine(line - 1); ed->SetFirstVisibleLineA(line-5); } } // else // Log(_("Cannot open file: ") + fname.GetLongPath()); }
void PythonDebugger::OnTerminatePipedProcess(wxProcessEvent &event) { // wxMessageBox(_("Debug Terminated")); ClearActiveMarkFromAllEditors(); m_DispatchedCommands.clear(); m_DebuggerActive=false; m_TimerPollDebugger.Stop(); delete m_pp; m_DebugLog->Append(_T("\n*** SESSION TERMINATED ***")); MarkAsStopped(); }