Commit 9f7e9dc0 authored by hjk's avatar hjk

debugger: refactoring of output channeling

parent 254a51bf
......@@ -33,6 +33,8 @@
#include "cdbcom.h"
#include "debuggerrunner.h"
#include <utils/qtcassert.h>
namespace Debugger {
namespace Internal {
......@@ -47,20 +49,16 @@ static int logChannel(ULONG mask)
return LogWarning;
if (mask & (DEBUG_OUTPUT_ERROR))
return LogError;
return LogMisc;
}
enum OutputKind { DebuggerOutput, DebuggerPromptOutput, DebuggeeOutput, DebuggeePromptOutput };
static inline OutputKind outputKind(ULONG mask)
{
if (mask & DEBUG_OUTPUT_DEBUGGEE)
return DebuggeeOutput;
//return DebuggeeOutput;
return AppOut;
if (mask & DEBUG_OUTPUT_DEBUGGEE_PROMPT)
return DebuggeePromptOutput;
//return DebuggeePromptOutput;
return AppErr;
if (mask & DEBUG_OUTPUT_PROMPT)
return DebuggerPromptOutput;
return DebuggerOutput;
//return DebuggerPromptOutput;
return AppErr;
return LogMisc;
}
CdbDebugOutput::CdbDebugOutput(CdbDebugEngine *engine)
......@@ -71,24 +69,10 @@ CdbDebugOutput::CdbDebugOutput(CdbDebugEngine *engine)
void CdbDebugOutput::output(ULONG mask, const QString &msg)
{
DebuggerRunControl *runControl = m_engine->runControl();
QTC_ASSER(runControl, return);
QTC_ASSERT(runControl, return);
if (debugCDB > 1)
qDebug() << Q_FUNC_INFO << "\n " << msg;
switch (outputKind(mask)) {
case DebuggerOutput:
runControl->showDebuggerOutput(msg, logChannel(mask));
break;
case DebuggerPromptOutput:
runControl->showDebuggerInput(msg, logChannel(mask));
break;
case DebuggeeOutput:
runControl->showApplicationOutput(msg, true);
break;
case DebuggeePromptOutput:
runControl->showApplicationOutput(msg, false);
break;
}
runControl->showMessage(msg, logChannel(mask));
}
} // namespace Internal
......
......@@ -37,6 +37,8 @@
namespace Debugger {
namespace Internal {
class CdbDebugEngine;
// Standard CDB output handler
class CdbDebugOutput : public CdbCore::DebugOutputBase
{
......
......@@ -263,7 +263,7 @@ void DisassemblerViewAgent::setFrame(const StackFrame &frame, bool tryMixed)
.arg(frame.function).arg(frame.file);
QTC_ASSERT(d->manager->runControl(), /**/);
if (d->manager->runControl())
d->manager->runControl()->showDebuggerOutput(msg);
d->manager->runControl()->showMessage(msg);
setContents(*it);
return;
}
......
......@@ -139,13 +139,17 @@ enum DebuggerCapabilities
enum LogChannel
{
LogInput, // Used for user input
LogMiscInput, // Used for misc stuff in the input pane
LogOutput,
LogWarning,
LogError,
LogStatus, // Used for status changed messages
LogTime, // Used for time stamp messages
LogDebug,
LogMisc
LogMisc,
AppOutput,
AppError,
StatusBar // LogStatus and also put to the status bar
};
} // namespace Debugger
......
......@@ -107,7 +107,7 @@
// use Q_FUNC_INFO?
# define STATE_DEBUG(s) \
do { QString msg; QTextStream ts(&msg); ts << s; \
showDebuggerOutput(msg, LogDebug); } while (0)
showMessage(msg, LogDebug); } while (0)
#else
# define STATE_DEBUG(s)
#endif
......@@ -830,7 +830,7 @@ void DebuggerManager::clearStatusMessage()
void DebuggerManager::showStatusMessage(const QString &msg0, int timeout)
{
Q_UNUSED(timeout)
showDebuggerOutput(msg0, LogStatus);
showMessage(msg0, LogStatus);
QString msg = msg0;
msg.replace(QLatin1Char('\n'), QString());
d->m_statusLabel->setText(msg);
......@@ -1060,8 +1060,9 @@ void DebuggerManager::startNewDebugger(DebuggerRunControl *runControl)
ProjectExplorer::ToolChain::ToolChainType(sp->toolChainType));
d->m_plugin->activateDebugMode();
showDebuggerOutput(tr("Starting debugger for tool chain '%1'...").arg(toolChainName), LogStatus);
showDebuggerOutput(DebuggerSettings::instance()->dump(), LogDebug);
showMessage(tr("Starting debugger for tool chain '%1'...").arg(toolChainName),
LogStatus);
showMessage(DebuggerSettings::instance()->dump(), LogDebug);
QString errorMessage;
QString settingsIdHint;
......@@ -1571,10 +1572,10 @@ void DebuggerManager::modulesDockToggled(bool on)
reloadModules();
}
void DebuggerManager::showDebuggerOutput(const QString &msg, int channel)
void DebuggerManager::showMessage(const QString &msg, int channel)
{
if (runControl())
runControl()->showDebuggerOutput(msg, channel);
runControl()->showMessage(msg, channel);
else
qDebug() << "OUTPUT: " << channel << msg;
}
......@@ -1776,7 +1777,7 @@ void DebuggerManager::setState(DebuggerState state, bool forced)
if (!forced && !isAllowedTransition(d->m_state, state))
qDebug() << "UNEXPECTED STATE TRANSITION: " << msg;
showDebuggerOutput(msg, LogDebug);
showMessage(msg, LogDebug);
//resetLocation();
if (state == d->m_state)
......@@ -2015,10 +2016,12 @@ DebuggerOutputWindow *DebuggerManager::debuggerOutputWindow() const
//
//////////////////////////////////////////////////////////////////////
/*
void IDebuggerEngine::showStatusMessage(const QString &msg, int timeout)
{
m_manager->showStatusMessage(msg, timeout);
}
*/
DebuggerState IDebuggerEngine::state() const
{
......
......@@ -315,7 +315,7 @@ signals:
private:
void init();
// void runTest(const QString &fileName);
void showDebuggerOutput(const QString &msg, int channel);
void showMessage(const QString &msg, int channel);
Q_SLOT void createNewDock(QWidget *widget);
void aboutToShutdown();
......
......@@ -196,9 +196,34 @@ void DebuggerRunControl::start()
}
}
void DebuggerRunControl::showApplicationOutput(const QString &data, bool onStdErr)
void DebuggerRunControl::showMessage(const QString &msg, int channel,
int timeout)
{
emit addToOutputWindowInline(this, data, onStdErr);
DebuggerOutputWindow *ow = m_manager->debuggerOutputWindow();
QTC_ASSERT(ow, return);
switch (channel) {
case StatusBar:
m_manager->showStatusMessage(msg, timeout);
ow->showOutput(LogStatus, msg);
break;
case AppOutput:
emit addToOutputWindowInline(this, msg, false);
break;
case AppError:
emit addToOutputWindowInline(this, msg, true);
break;
case LogMiscInput:
ow->showInput(LogMisc, msg);
ow->showOutput(LogMisc, msg);
break;
case LogInput:
ow->showInput(channel, msg);
ow->showOutput(channel, msg);
break;
default:
ow->showOutput(channel, msg);
break;
}
}
void DebuggerRunControl::slotMessageAvailable(const QString &data, bool isError)
......@@ -206,19 +231,6 @@ void DebuggerRunControl::slotMessageAvailable(const QString &data, bool isError)
emit appendMessage(this, data, isError);
}
void DebuggerRunControl::showDebuggerOutput(const QString &output, int channel)
{
DebuggerOutputWindow *ow = m_manager->debuggerOutputWindow();
QTC_ASSERT(ow, return);
ow->showOutput(channel, output);
}
void DebuggerRunControl::showDebuggerInput(const QString &input, int channel)
{
DebuggerOutputWindow *ow = m_manager->debuggerOutputWindow();
QTC_ASSERT(ow, return);
ow->showInput(channel, input);
}
void DebuggerRunControl::stop()
{
......
......@@ -130,11 +130,7 @@ signals:
void stopRequested();
public slots:
void showDebuggerOutput(const QString &msg)
{ showDebuggerOutput(msg, LogDebug); }
void showApplicationOutput(const QString &output, bool onStdErr);
void showDebuggerOutput(const QString &output, int channel);
void showDebuggerInput(const QString &input, int channel);
void showMessage(const QString &output, int channel = LogDebug, int timeout = -1);
private slots:
void slotMessageAvailable(const QString &data, bool isError);
......
......@@ -109,10 +109,8 @@ protected:
{ return m_engine->startParameters(); }
DebuggerRunControl *runControl() const
{ return m_engine->runControl(); }
void debugMessage(const QString &msg) const
{ m_engine->debugMessage(msg); }
void showStatusMessage(const QString &msg) const
{ m_engine->showStatusMessage(msg); }
void showMessage(const QString &msg, int channel = LogDebug, int timeout = 1)
{ runControl()->showMessage(msg, channel, timeout); }
void showMessageBox(int icon, const QString &title, const QString &text) const
{ m_engine->showMessageBox(icon, title, text); }
......
......@@ -91,8 +91,8 @@ void AbstractPlainGdbAdapter::handleExecRun(const GdbResponse &response)
{
if (response.resultClass == GdbResultRunning) {
QTC_ASSERT(state() == InferiorRunning, qDebug() << state());
debugMessage(_("INFERIOR STARTED"));
showStatusMessage(msgInferiorStarted());
showMessage(_("INFERIOR STARTED"));
showMessage(msgInferiorStarted(), StatusBar);
// FIXME: That's the wrong place for it.
if (theDebuggerBoolSetting(EnableReverseDebugging))
m_engine->postCommand("target record");
......
......@@ -58,7 +58,7 @@ void AttachGdbAdapter::startAdapter()
{
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
setState(AdapterStarting);
debugMessage(_("TRYING TO START ADAPTER"));
showMessage(_("TRYING TO START ADAPTER"));
if (!m_engine->startGdb())
return;
......@@ -80,8 +80,8 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response)
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultDone) {
setState(InferiorStopped);
debugMessage(_("INFERIOR ATTACHED"));
showStatusMessage(msgAttachedToStoppedInferior());
showMessage(_("INFERIOR ATTACHED"));
showMessage(msgAttachedToStoppedInferior(), StatusBar);
emit inferiorPrepared();
m_engine->updateAll();
} else {
......@@ -95,7 +95,7 @@ void AttachGdbAdapter::interruptInferior()
const qint64 pid = startParameters().attachPID;
QTC_ASSERT(pid > 0, return);
if (!interruptProcess(pid))
debugMessage(_("CANNOT INTERRUPT %1").arg(pid));
showMessage(_("CANNOT INTERRUPT %1").arg(pid));
}
} // namespace Internal
......
......@@ -160,8 +160,8 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild
// Avoid endless loops created by faulty dumpers.
QByteArray processedName = QByteArray::number(dumpChildren) + '-' + data.iname;
if (m_processedNames.contains(processedName)) {
showDebuggerInput(
_("<Breaking endless loop for " + data.iname + '>'), LogStatus);
showMessage(
_("<Breaking endless loop for " + data.iname + '>'), LogMiscInput);
data.setAllUnneeded();
data.setValue(_("<unavailable>"));
data.setHasChildren(false);
......@@ -395,7 +395,7 @@ void GdbEngine::handleDebuggingHelperValue2Classic(const GdbResponse &response)
// Remove traces of the question, too.
if (m_cookieForToken.contains(response.token - 1)) {
m_cookieForToken.remove(response.token - 1);
debugMessage(_("DETECTING LOST COMMAND %1").arg(response.token - 1));
showMessage(_("DETECTING LOST COMMAND %1").arg(response.token - 1));
--m_pendingWatchRequests;
data.setError(WatchData::msgNotInScope());
insertData(data);
......@@ -591,12 +591,12 @@ void GdbEngine::setDebugDebuggingHelpersClassic(const QVariant &on)
{
PRECONDITION;
if (on.toBool()) {
debugMessage(_("SWITCHING ON DUMPER DEBUGGING"));
showMessage(_("SWITCHING ON DUMPER DEBUGGING"));
postCommand("set unwindonsignal off");
m_manager->breakByFunction(_("qDumpObjectData440"));
//updateLocals();
} else {
debugMessage(_("SWITCHING OFF DUMPER DEBUGGING"));
showMessage(_("SWITCHING OFF DUMPER DEBUGGING"));
postCommand("set unwindonsignal on");
}
}
......@@ -641,7 +641,7 @@ void GdbEngine::handleStackListArgumentsClassic(const GdbResponse &response)
} else {
// Seems to occur on "RedHat 4 based Linux" gdb 7.0.1:
// ^error,msg="Cannot access memory at address 0x0"
debugMessage(_("UNEXPECTED RESPONSE: ") + response.toString());
showMessage(_("UNEXPECTED RESPONSE: ") + response.toString());
}
}
......@@ -698,7 +698,7 @@ bool GdbEngine::checkDebuggingHelpersClassic()
const QStringList &locations = manager()->qtDumperLibraryLocations();
const QString loc = locations.join(QLatin1String(", "));
const QString msg = tr("The debugging helper library was not found at %1.").arg(loc);
debugMessage(msg);
showMessage(msg);
manager()->showQtDumperLibraryWarning(msg);
return false;
}
......@@ -757,11 +757,11 @@ void GdbEngine::handleDebuggingHelperVersionCheckClassic(const GdbResponse &resp
"application (%2).\nThis might yield incorrect results.")
.arg(dumperQtVersion).arg(debuggeeQtVersion));
} else {
debugMessage(_("DUMPER VERSION CHECK SUCCESSFUL: ")
showMessage(_("DUMPER VERSION CHECK SUCCESSFUL: ")
+ dumperQtVersion);
}
} else {
debugMessage("DUMPER VERSION CHECK NOT COMPLETED");
showMessage("DUMPER VERSION CHECK NOT COMPLETED");
}
}
......
......@@ -61,7 +61,7 @@ void CoreGdbAdapter::startAdapter()
{
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
setState(AdapterStarting);
debugMessage(_("TRYING TO START ADAPTER"));
showMessage(_("TRYING TO START ADAPTER"));
if (!m_engine->startGdb())
return;
......@@ -106,7 +106,7 @@ void CoreGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultDone) {
showStatusMessage(tr("Symbols found."));
showMessage(tr("Symbols found."), StatusBar);
} else {
QString msg = tr("Loading symbols from \"%1\" failed:\n").arg(m_executable)
+ QString::fromLocal8Bit(response.data.findChild("msg").data());
......@@ -144,7 +144,7 @@ void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
.absoluteFilePath(m_executable);
if (QFile::exists(m_executable)) {
// Finish extra round ...
showStatusMessage(tr("Attached to core temporarily."));
showMessage(tr("Attached to core temporarily."), StatusBar);
m_engine->postCommand("detach");
// ... and retry.
loadExeAndSyms();
......@@ -156,7 +156,7 @@ void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
tr("Unable to determine executable from core file."));
}
#endif
showStatusMessage(tr("Attached to core."));
showMessage(tr("Attached to core."), StatusBar);
setState(InferiorUnrunnable);
m_engine->updateAll();
} else {
......
......@@ -341,18 +341,13 @@ void GdbEngine::readDebugeeOutput(const QByteArray &data)
data.constData(), data.length(), &m_outputCodecState), true);
}
void GdbEngine::debugMessage(const QString &msg)
{
showDebuggerOutput(msg, LogDebug);
}
void GdbEngine::handleResponse(const QByteArray &buff)
{
static QTime lastTime;
if (theDebuggerBoolSetting(LogTimeStamps))
showDebuggerOutput(currentTime(), LogTime);
showDebuggerOutput(QString::fromLocal8Bit(buff, buff.length()), LogOutput);
showMessage(currentTime(), LogTime);
showMessage(QString::fromLocal8Bit(buff, buff.length()), LogOutput);
#if 0
qDebug() // << "#### start response handling #### "
......@@ -624,7 +619,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
void GdbEngine::readGdbStandardError()
{
QByteArray err = gdbProc()->readAllStandardError();
debugMessage(_("UNEXPECTED GDB STDERR: " + err));
showMessage(_("UNEXPECTED GDB STDERR: " + err));
if (err == "Undefined command: \"bb\". Try \"help\".\n")
return;
if (err.startsWith("BFD: reopening"))
......@@ -678,7 +673,7 @@ void GdbEngine::interruptInferior()
setState(InferiorStopping);
showStatusMessage(tr("Stop requested..."), 5000);
debugMessage(_("TRYING TO INTERRUPT INFERIOR"));
showMessage(_("TRYING TO INTERRUPT INFERIOR"));
m_gdbAdapter->interruptInferior();
}
......@@ -696,12 +691,12 @@ void GdbEngine::maybeHandleInferiorPidChanged(const QString &pid0)
{
const qint64 pid = pid0.toLongLong();
if (pid == 0) {
debugMessage(_("Cannot parse PID from %1").arg(pid0));
showMessage(_("Cannot parse PID from %1").arg(pid0));
return;
}
if (pid == inferiorPid())
return;
debugMessage(_("FOUND PID %1").arg(pid));
showMessage(_("FOUND PID %1").arg(pid));
handleInferiorPidChanged(pid);
}
......@@ -748,7 +743,7 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd)
{
if (!stateAcceptsGdbCommands(state())) {
PENDING_DEBUG(_("NO GDB PROCESS RUNNING, CMD IGNORED: " + cmd.command));
debugMessage(_("NO GDB PROCESS RUNNING, CMD IGNORED: %1 %2")
showMessage(_("NO GDB PROCESS RUNNING, CMD IGNORED: %1 %2")
.arg(_(cmd.command)).arg(state()));
return;
}
......@@ -779,24 +774,24 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd)
flushCommand(cmd);
} else {
// Queue the commands that we cannot send at once.
debugMessage(_("QUEUING COMMAND " + cmd.command));
showMessage(_("QUEUING COMMAND " + cmd.command));
m_commandsToRunOnTemporaryBreak.append(cmd);
if (state() == InferiorStopping) {
if (cmd.flags & LosesChild)
setState(InferiorStopping_Kill);
debugMessage(_("CHILD ALREADY BEING INTERRUPTED. STILL HOPING."));
showMessage(_("CHILD ALREADY BEING INTERRUPTED. STILL HOPING."));
// Calling shutdown() here breaks all situations where two
// NeedsStop commands are issued in quick succession.
} else if (state() == InferiorStopping_Kill) {
debugMessage(_("CHILD ALREADY BEING INTERRUPTED (KILL PENDING)"));
showMessage(_("CHILD ALREADY BEING INTERRUPTED (KILL PENDING)"));
// FIXME
shutdown();
} else if (state() == InferiorRunningRequested) {
if (cmd.flags & LosesChild)
setState(InferiorRunningRequested_Kill);
debugMessage(_("RUNNING REQUESTED; POSTPONING INTERRUPT"));
showMessage(_("RUNNING REQUESTED; POSTPONING INTERRUPT"));
} else if (state() == InferiorRunningRequested_Kill) {
debugMessage(_("RUNNING REQUESTED; POSTPONING INTERRUPT (KILL PENDING)"));
showMessage(_("RUNNING REQUESTED; POSTPONING INTERRUPT (KILL PENDING)"));
} else if (state() == InferiorRunning) {
showStatusMessage(tr("Stopping temporarily"), 1000);
interruptInferiorTemporarily();
......@@ -814,7 +809,7 @@ void GdbEngine::flushQueuedCommands()
showStatusMessage(tr("Processing queued commands"), 1000);
while (!m_commandsToRunOnTemporaryBreak.isEmpty()) {
GdbCommand cmd = m_commandsToRunOnTemporaryBreak.takeFirst();
debugMessage(_("RUNNING QUEUED COMMAND " + cmd.command + ' '
showMessage(_("RUNNING QUEUED COMMAND " + cmd.command + ' '
+ cmd.callbackName));
flushCommand(cmd);
}
......@@ -824,8 +819,8 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
{
GdbCommand cmd = cmd0;
if (state() == DebuggerNotReady) {
showDebuggerInput(_(cmd.command), LogInput);
debugMessage(_("GDB PROCESS NOT RUNNING, PLAIN CMD IGNORED: " + cmd.command));
showMessage(_(cmd.command), LogInput);
showMessage(_("GDB PROCESS NOT RUNNING, PLAIN CMD IGNORED: " + cmd.command));
return;
}
......@@ -833,7 +828,7 @@ void GdbEngine::flushCommand(const GdbCommand &cmd0)
cmd.postTime = QTime::currentTime();
m_cookieForToken[currentToken()] = cmd;
cmd.command = QByteArray::number(currentToken()) + cmd.command;
showDebuggerInput(_(cmd.command), LogInput);
showMessage(_(cmd.command), LogInput);
m_gdbAdapter->write(cmd.command + "\r\n");
......@@ -862,10 +857,10 @@ void GdbEngine::commandTimeout()
msg += ": " + cmd.command + " => ";
QTC_ASSERT(cmd.callbackName, /**/);
msg += cmd.callbackName;
debugMessage(_(msg));
showMessage(_(msg));
}
if (killIt) {
debugMessage(_("TIMED OUT WAITING FOR GDB REPLY. COMMANDS STILL IN PROGRESS:"));
showMessage(_("TIMED OUT WAITING FOR GDB REPLY. COMMANDS STILL IN PROGRESS:"));
int timeOut = m_commandTimer->interval();
//m_commandTimer->stop();
const QString msg = tr("The gdb process has not responded "
......@@ -879,15 +874,15 @@ void GdbEngine::commandTimeout()
mb->button(QMessageBox::Cancel)->setText(tr("Give gdb more time"));
mb->button(QMessageBox::Ok)->setText(tr("Stop debugging"));
if (mb->exec() == QMessageBox::Ok) {
debugMessage(_("KILLING DEBUGGER AS REQUESTED BY USER"));
showMessage(_("KILLING DEBUGGER AS REQUESTED BY USER"));
// This is an undefined state, so we just pull the emergency brake.
manager()->watchHandler()->endCycle();
gdbProc()->kill();
} else {
debugMessage(_("CONTINUE DEBUGGER AS REQUESTED BY USER"));
showMessage(_("CONTINUE DEBUGGER AS REQUESTED BY USER"));
}
} else {
debugMessage(_("\nNON-CRITICAL TIMEOUT\n"));
showMessage(_("\nNON-CRITICAL TIMEOUT\n"));
}
}
......@@ -906,7 +901,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
// reported in the "first" response to the command) in practice it
// does. We try to handle a few situations we are aware of gracefully.
// Ideally, this code should not be present at all.
debugMessage(_("COOKIE FOR TOKEN %1 ALREADY EATEN. "
showMessage(_("COOKIE FOR TOKEN %1 ALREADY EATEN. "
"TWO RESPONSES FOR ONE COMMAND?").arg(token));
if (response->resultClass == GdbResultError) {
QByteArray msg = response->data.findChild("msg").data();
......@@ -914,7 +909,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
// Handle a case known to occur on Linux/gdb 6.8 when debugging moc
// with helpers enabled. In this case we get a second response with
// msg="Cannot find new threads: generic error"
debugMessage(_("APPLYING WORKAROUND #1"));
showMessage(_("APPLYING WORKAROUND #1"));
showMessageBox(QMessageBox::Critical,
tr("Executable failed"), QString::fromLocal8Bit(msg));
showStatusMessage(tr("Process failed to start"));
......@@ -922,13 +917,13 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
} else if (msg == "\"finish\" not meaningful in the outermost frame.") {
// Handle a case known to appear on gdb 6.4 symbianelf when
// the stack is cut due to access to protected memory.
debugMessage(_("APPLYING WORKAROUND #2"));
showMessage(_("APPLYING WORKAROUND #2"));
setState(InferiorStopping);
setState(InferiorStopped);
} else if (msg.startsWith("Cannot find bounds of current function")) {
// Happens when running "-exec-next" in a function for which
// there is no debug information. Divert to "-exec-next-step"
debugMessage(_("APPLYING WORKAROUND #3"));
showMessage(_("APPLYING WORKAROUND #3"));
setState(InferiorStopping);
setState(InferiorStopped);
executeNextI();
......@@ -936,7 +931,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
// Happens on archer-tromey-python 6.8.50.20090910-cvs
// There might to be a race between a process shutting down
// and library load messages.
debugMessage(_("APPLYING WORKAROUND #4"));
showMessage(_("APPLYING WORKAROUND #4"));
setState(InferiorStopping);
setState(InferiorStopped);
setState(InferiorShuttingDown);
......@@ -958,14 +953,14 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
GdbCommand cmd = m_cookieForToken.take(token);