|
|
@ -93,7 +93,7 @@ Breakpoint::Data Debugger::GuiManager::currentBreakpointData()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const Breakpoint::Data *data = Main::breakpointsView().currentData();
|
|
|
|
const Breakpoint::Data *data = Main::breakpointsView().currentData();
|
|
|
|
if (data) return *data;
|
|
|
|
if (data) return *data;
|
|
|
|
TextEditor *editor = ::tqqt_cast<TextEditor *>(Main::currentEditor());
|
|
|
|
TextEditor *editor = ::tqt_cast<TextEditor *>(Main::currentEditor());
|
|
|
|
Q_ASSERT(editor);
|
|
|
|
Q_ASSERT(editor);
|
|
|
|
return Breakpoint::Data(editor->url(), editor->cursorLine());
|
|
|
|
return Breakpoint::Data(editor->url(), editor->cursorLine());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -183,7 +183,7 @@ void Debugger::GuiManager::updateView(bool gotoPC)
|
|
|
|
bool currentHasPC = false;
|
|
|
|
bool currentHasPC = false;
|
|
|
|
TQValueList<Editor *>::iterator ite;
|
|
|
|
TQValueList<Editor *>::iterator ite;
|
|
|
|
for (ite=_editors.begin(); ite!=_editors.end(); ++ite) {
|
|
|
|
for (ite=_editors.begin(); ite!=_editors.end(); ++ite) {
|
|
|
|
TextEditor *e = ::tqqt_cast<TextEditor *>(*ite);
|
|
|
|
TextEditor *e = ::tqt_cast<TextEditor *>(*ite);
|
|
|
|
if ( e==0 ) continue;
|
|
|
|
if ( e==0 ) continue;
|
|
|
|
updateEditorMarks(*e);
|
|
|
|
updateEditorMarks(*e);
|
|
|
|
if ( !_currentSourceLines.contains(e->url()) ) continue;
|
|
|
|
if ( !_currentSourceLines.contains(e->url()) ) continue;
|
|
|
@ -202,9 +202,9 @@ void Debugger::GuiManager::updateView(bool gotoPC)
|
|
|
|
case 1: if ( !Main::projectManager().contains(it.key()) ) continue; break;
|
|
|
|
case 1: if ( !Main::projectManager().contains(it.key()) ) continue; break;
|
|
|
|
case 2: if ( !it.key().exists() ) continue; break;
|
|
|
|
case 2: if ( !it.key().exists() ) continue; break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TextEditor *e = ::tqqt_cast<TextEditor *>(Main::editorManager().findEditor(it.key()));
|
|
|
|
TextEditor *e = ::tqt_cast<TextEditor *>(Main::editorManager().findEditor(it.key()));
|
|
|
|
if ( e==0 ) {
|
|
|
|
if ( e==0 ) {
|
|
|
|
if (gotoPC) e = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(it.key()));
|
|
|
|
if (gotoPC) e = ::tqt_cast<TextEditor *>(Main::editorManager().openEditor(it.key()));
|
|
|
|
if ( e==0 ) continue;
|
|
|
|
if ( e==0 ) continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
updateEditorMarks(*e);
|
|
|
|
updateEditorMarks(*e);
|
|
|
@ -221,7 +221,7 @@ Register::MainView *Debugger::GuiManager::registerView() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQValueList<Editor *>::const_iterator it = _editors.begin();
|
|
|
|
TQValueList<Editor *>::const_iterator it = _editors.begin();
|
|
|
|
for (; it!=_editors.end(); ++it) {
|
|
|
|
for (; it!=_editors.end(); ++it) {
|
|
|
|
Register::MainView *rv = ::tqqt_cast<Register::MainView *>(*it);
|
|
|
|
Register::MainView *rv = ::tqt_cast<Register::MainView *>(*it);
|
|
|
|
if (rv) return rv;
|
|
|
|
if (rv) return rv;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
@ -234,7 +234,7 @@ bool Debugger::GuiManager::isProjectSource(const PURL::Url &url) const
|
|
|
|
|
|
|
|
|
|
|
|
void Debugger::GuiManager::showDisassemblyLocation()
|
|
|
|
void Debugger::GuiManager::showDisassemblyLocation()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TextEditor *editor = ::tqqt_cast<TextEditor *>(Main::currentEditor());
|
|
|
|
TextEditor *editor = ::tqt_cast<TextEditor *>(Main::currentEditor());
|
|
|
|
Q_ASSERT(editor);
|
|
|
|
Q_ASSERT(editor);
|
|
|
|
Q_ASSERT(_coff);
|
|
|
|
Q_ASSERT(_coff);
|
|
|
|
TQValueVector<Address> addresses = _coff->addresses(editor->url(), editor->cursorLine());
|
|
|
|
TQValueVector<Address> addresses = _coff->addresses(editor->url(), editor->cursorLine());
|
|
|
@ -244,6 +244,6 @@ void Debugger::GuiManager::showDisassemblyLocation()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int line = _coff->lineForAddress(_coff->url(), addresses[0]);
|
|
|
|
int line = _coff->lineForAddress(_coff->url(), addresses[0]);
|
|
|
|
if ( line==-1 ) return; // possible ?
|
|
|
|
if ( line==-1 ) return; // possible ?
|
|
|
|
TextEditor *e = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(_coff->url()));
|
|
|
|
TextEditor *e = ::tqt_cast<TextEditor *>(Main::editorManager().openEditor(_coff->url()));
|
|
|
|
if (e) e->setCursor(line, 0);
|
|
|
|
if (e) e->setCursor(line, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|