Commit ef2f7e38 authored by hjk's avatar hjk

debugger: code cosmetics

parent 5fa89f14
...@@ -980,8 +980,8 @@ void DebuggerEngine::notifyInferiorExited() ...@@ -980,8 +980,8 @@ void DebuggerEngine::notifyInferiorExited()
void DebuggerEngine::setState(DebuggerState state, bool forced) void DebuggerEngine::setState(DebuggerState state, bool forced)
{ {
// qDebug() << "STATUS CHANGE: FROM " << stateName(d->m_state) //qDebug() << "STATUS CHANGE: FROM " << stateName(d->m_state)
// << " TO " << stateName(state); // << " TO " << stateName(state);
DebuggerState oldState = d->m_state; DebuggerState oldState = d->m_state;
d->m_state = state; d->m_state = state;
...@@ -1092,10 +1092,9 @@ void DebuggerEngine::setActive(bool on) ...@@ -1092,10 +1092,9 @@ void DebuggerEngine::setActive(bool on)
{ {
//qDebug() << "SETTING ACTIVE" << this << on; //qDebug() << "SETTING ACTIVE" << this << on;
d->m_isActive = on; d->m_isActive = on;
//breakHandler()->updateMarkers();
} }
// called by DebuggerRunControl // Called by DebuggerRunControl.
void DebuggerEngine::quitDebugger() void DebuggerEngine::quitDebugger()
{ {
showMessage("QUIT DEBUGGER REQUESTED"); showMessage("QUIT DEBUGGER REQUESTED");
...@@ -1109,7 +1108,7 @@ void DebuggerEngine::quitDebugger() ...@@ -1109,7 +1108,7 @@ void DebuggerEngine::quitDebugger()
d->doInterruptInferior(); d->doInterruptInferior();
break; break;
default: default:
// FIXME: We should disable the actions connected to that // FIXME: We should disable the actions connected to that.
notifyInferiorIll(); notifyInferiorIll();
break; break;
} }
...@@ -1367,28 +1366,34 @@ bool DebuggerEngine::isDying() const ...@@ -1367,28 +1366,34 @@ bool DebuggerEngine::isDying() const
return targetState() == DebuggerFinished; return targetState() == DebuggerFinished;
} }
QString DebuggerEngine::msgWatchpointTriggered(BreakpointId id, const int number, quint64 address) QString DebuggerEngine::msgWatchpointTriggered(BreakpointId id,
const int number, quint64 address)
{ {
return id != BreakpointId(-1) ? return id != BreakpointId(-1)
tr("Watchpoint %1 (%2) at 0x%3 triggered.").arg(id).arg(number).arg(address, 0, 16) : ? tr("Watchpoint %1 (%2) at 0x%3 triggered.")
tr("Internal watchpoint %1 at 0x%2 triggered.").arg(number).arg(address, 0, 16); .arg(id).arg(number).arg(address, 0, 16)
: tr("Internal watchpoint %1 at 0x%2 triggered.")
.arg(number).arg(address, 0, 16);
} }
QString DebuggerEngine::msgWatchpointTriggered(BreakpointId id, const int number, QString DebuggerEngine::msgWatchpointTriggered(BreakpointId id,
quint64 address, const QString &threadId) const int number, quint64 address, const QString &threadId)
{ {
return id != BreakpointId(-1) ? return id != BreakpointId(-1)
tr("Watchpoint %1 (%2) at 0x%3 in thread %4 triggered."). ? tr("Watchpoint %1 (%2) at 0x%3 in thread %4 triggered.")
arg(id).arg(number).arg(address, 0, 16).arg(threadId) : .arg(id).arg(number).arg(address, 0, 16).arg(threadId)
tr("Internal watchpoint %1 at 0x%2 in thread %3 triggered."). : tr("Internal watchpoint %1 at 0x%2 in thread %3 triggered.")
arg(id).arg(number).arg(address, 0, 16).arg(threadId); .arg(id).arg(number).arg(address, 0, 16).arg(threadId);
} }
QString DebuggerEngine::msgBreakpointTriggered(BreakpointId id, const int number, const QString &threadId) QString DebuggerEngine::msgBreakpointTriggered(BreakpointId id,
const int number, const QString &threadId)
{ {
return id != BreakpointId(-1) ? return id != BreakpointId(-1)
tr("Stopped at breakpoint %1 (%2) in thread %3.").arg(id).arg(number).arg(threadId) : ? tr("Stopped at breakpoint %1 (%2) in thread %3.")
tr("Stopped at internal breakpoint %1 in thread %2.").arg(number).arg(threadId); .arg(id).arg(number).arg(threadId)
: tr("Stopped at internal breakpoint %1 in thread %2.")
.arg(number).arg(threadId);
} }
QString DebuggerEngine::msgStopped(const QString &reason) QString DebuggerEngine::msgStopped(const QString &reason)
...@@ -1396,12 +1401,14 @@ QString DebuggerEngine::msgStopped(const QString &reason) ...@@ -1396,12 +1401,14 @@ QString DebuggerEngine::msgStopped(const QString &reason)
return reason.isEmpty() ? tr("Stopped.") : tr("Stopped: \"%1\"").arg(reason); return reason.isEmpty() ? tr("Stopped.") : tr("Stopped: \"%1\"").arg(reason);
} }
QString DebuggerEngine::msgStoppedBySignal(const QString &meaning, const QString &name) QString DebuggerEngine::msgStoppedBySignal(const QString &meaning,
const QString &name)
{ {
return tr("Stopped: %1 by signal %2.").arg(meaning, name); return tr("Stopped: %1 by signal %2.").arg(meaning, name);
} }
QString DebuggerEngine::msgStoppedByException(const QString &description, const QString &threadId) QString DebuggerEngine::msgStoppedByException(const QString &description,
const QString &threadId)
{ {
return tr("Stopped in thread %1 by: %2.").arg(threadId, description); return tr("Stopped in thread %1 by: %2.").arg(threadId, description);
} }
...@@ -1427,7 +1434,8 @@ void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name ...@@ -1427,7 +1434,8 @@ void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name
void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description) void DebuggerEngine::showStoppedByExceptionMessageBox(const QString &description)
{ {
const QString msg = tr("<p>The inferior stopped because it triggered an exception.<p>%1"). const QString msg =
tr("<p>The inferior stopped because it triggered an exception.<p>%1").
arg(description); arg(description);
showMessageBox(QMessageBox::Information, tr("Exception Triggered"), msg); showMessageBox(QMessageBox::Information, tr("Exception Triggered"), msg);
} }
......
...@@ -4307,19 +4307,8 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type) ...@@ -4307,19 +4307,8 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
if (m_commandTimer.isActive()) if (m_commandTimer.isActive())
m_commandTimer.stop(); m_commandTimer.stop();
//qDebug() << "GDB PROCESS FINISHED";
showMessage(_("GDB PROCESS FINISHED, status %1, code %2").arg(type).arg(code)); showMessage(_("GDB PROCESS FINISHED, status %1, code %2").arg(type).arg(code));
/*
if (!m_gdbAdapter) {
showMessage(_("NO ADAPTER PRESENT"));
} else if (state() == EngineShutdownRequested) {
showMessage(_("GOING TO SHUT DOWN ADAPTER"));
//m_gdbAdapter->shutdownEngine(); FIXME AAA
} else if (state() != EngineSetupFailed) {
showStatusMessage(msg);
//m_gdbAdapter->shutdownEngine();
}
*/
switch (state()) { switch (state()) {
case EngineShutdownRequested: case EngineShutdownRequested:
notifyEngineShutdownOk(); notifyEngineShutdownOk();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment