forked from qt-creator/qt-creator
Debugger: Clean up debuggerengine.cpp
Some leftover stringfreeze workaround, plus QLatin1*. Change-Id: I5e143af5cda64cb29b7769174187fc86185a89cb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -37,7 +37,6 @@
|
|||||||
#include "logwindow.h"
|
#include "logwindow.h"
|
||||||
#include "memoryagent.h"
|
#include "memoryagent.h"
|
||||||
#include "moduleshandler.h"
|
#include "moduleshandler.h"
|
||||||
#include "gdb/gdbengine.h" // REMOVE
|
|
||||||
#include "registerhandler.h"
|
#include "registerhandler.h"
|
||||||
#include "sourcefileshandler.h"
|
#include "sourcefileshandler.h"
|
||||||
#include "sourceutils.h"
|
#include "sourceutils.h"
|
||||||
@@ -564,7 +563,7 @@ void DebuggerEngine::startDebugger(DebuggerRunControl *runControl)
|
|||||||
d->m_runControl->setApplicationProcessHandle(ProcessHandle(d->m_inferiorPid));
|
d->m_runControl->setApplicationProcessHandle(ProcessHandle(d->m_inferiorPid));
|
||||||
|
|
||||||
if (isNativeMixedActive())
|
if (isNativeMixedActive())
|
||||||
d->m_runParameters.inferior.environment.set(QLatin1String("QV4_FORCE_INTERPRETER"), QLatin1String("1"));
|
d->m_runParameters.inferior.environment.set("QV4_FORCE_INTERPRETER", "1");
|
||||||
|
|
||||||
action(OperateByInstruction)->setEnabled(hasCapability(DisassemblerCapability));
|
action(OperateByInstruction)->setEnabled(hasCapability(DisassemblerCapability));
|
||||||
|
|
||||||
@@ -609,7 +608,7 @@ void DebuggerEngine::gotoLocation(const Location &loc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (loc.fileName().isEmpty()) {
|
if (loc.fileName().isEmpty()) {
|
||||||
showMessage(QLatin1String("CANNOT GO TO THIS LOCATION"));
|
showMessage("CANNOT GO TO THIS LOCATION");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const QString file = QDir::cleanPath(loc.fileName());
|
const QString file = QDir::cleanPath(loc.fileName());
|
||||||
@@ -633,7 +632,7 @@ void DebuggerEngine::gotoLocation(const Location &loc)
|
|||||||
// Called from RunControl.
|
// Called from RunControl.
|
||||||
void DebuggerEngine::handleStartFailed()
|
void DebuggerEngine::handleStartFailed()
|
||||||
{
|
{
|
||||||
showMessage(QLatin1String("HANDLE RUNCONTROL START FAILED"));
|
showMessage("HANDLE RUNCONTROL START FAILED");
|
||||||
d->m_runControl = 0;
|
d->m_runControl = 0;
|
||||||
d->m_progress.setProgressValue(900);
|
d->m_progress.setProgressValue(900);
|
||||||
d->m_progress.reportCanceled();
|
d->m_progress.reportCanceled();
|
||||||
@@ -643,7 +642,7 @@ void DebuggerEngine::handleStartFailed()
|
|||||||
// Called from RunControl.
|
// Called from RunControl.
|
||||||
void DebuggerEngine::handleFinished()
|
void DebuggerEngine::handleFinished()
|
||||||
{
|
{
|
||||||
showMessage(QLatin1String("HANDLE RUNCONTROL FINISHED"));
|
showMessage("HANDLE RUNCONTROL FINISHED");
|
||||||
d->m_runControl = 0;
|
d->m_runControl = 0;
|
||||||
d->m_progress.setProgressValue(1000);
|
d->m_progress.setProgressValue(1000);
|
||||||
d->m_progress.reportFinished();
|
d->m_progress.reportFinished();
|
||||||
@@ -905,7 +904,7 @@ void DebuggerEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &re
|
|||||||
|
|
||||||
if (result.gdbServerPort.isValid()) {
|
if (result.gdbServerPort.isValid()) {
|
||||||
QString &rc = d->m_runParameters.remoteChannel;
|
QString &rc = d->m_runParameters.remoteChannel;
|
||||||
const int sepIndex = rc.lastIndexOf(QLatin1Char(':'));
|
const int sepIndex = rc.lastIndexOf(':');
|
||||||
if (sepIndex != -1) {
|
if (sepIndex != -1) {
|
||||||
rc.replace(sepIndex + 1, rc.count() - sepIndex - 1,
|
rc.replace(sepIndex + 1, rc.count() - sepIndex - 1,
|
||||||
QString::number(result.gdbServerPort.number()));
|
QString::number(result.gdbServerPort.number()));
|
||||||
@@ -1785,9 +1784,9 @@ QString DebuggerEngine::msgInterrupted()
|
|||||||
void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
|
void DebuggerEngine::showStoppedBySignalMessageBox(QString meaning, QString name)
|
||||||
{
|
{
|
||||||
if (name.isEmpty())
|
if (name.isEmpty())
|
||||||
name = QLatin1Char(' ') + tr("<Unknown>", "name") + QLatin1Char(' ');
|
name = ' ' + tr("<Unknown>", "name") + ' ';
|
||||||
if (meaning.isEmpty())
|
if (meaning.isEmpty())
|
||||||
meaning = QLatin1Char(' ') + tr("<Unknown>", "meaning") + QLatin1Char(' ');
|
meaning = ' ' + tr("<Unknown>", "meaning") + ' ';
|
||||||
const QString msg = tr("<p>The inferior stopped because it received a "
|
const QString msg = tr("<p>The inferior stopped because it received a "
|
||||||
"signal from the operating system.<p>"
|
"signal from the operating system.<p>"
|
||||||
"<table><tr><td>Signal name : </td><td>%1</td></tr>"
|
"<table><tr><td>Signal name : </td><td>%1</td></tr>"
|
||||||
@@ -1856,14 +1855,14 @@ void DebuggerEngine::validateExecutable(DebuggerRunParameters *sp)
|
|||||||
"experience for this binary format.");
|
"experience for this binary format.");
|
||||||
return;
|
return;
|
||||||
} else if (warnOnRelease) {
|
} else if (warnOnRelease) {
|
||||||
if (!symbolFile.endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
|
if (!symbolFile.endsWith(".exe", Qt::CaseInsensitive))
|
||||||
symbolFile.append(QLatin1String(".exe"));
|
symbolFile.append(".exe");
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
QStringList rc;
|
QStringList rc;
|
||||||
if (getPDBFiles(symbolFile, &rc, &errorMessage) && !rc.isEmpty())
|
if (getPDBFiles(symbolFile, &rc, &errorMessage) && !rc.isEmpty())
|
||||||
return;
|
return;
|
||||||
if (!errorMessage.isEmpty()) {
|
if (!errorMessage.isEmpty()) {
|
||||||
detailedWarning.append(QLatin1Char('\n'));
|
detailedWarning.append('\n');
|
||||||
detailedWarning.append(errorMessage);
|
detailedWarning.append(errorMessage);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1979,12 +1978,12 @@ void DebuggerEngine::validateExecutable(DebuggerRunParameters *sp)
|
|||||||
tr("The selected debugger may be inappropiate for the inferior.\n"
|
tr("The selected debugger may be inappropiate for the inferior.\n"
|
||||||
"Examining symbols and setting breakpoints by file name and line number "
|
"Examining symbols and setting breakpoints by file name and line number "
|
||||||
"may fail.\n")
|
"may fail.\n")
|
||||||
+ QLatin1Char('\n') + detailedWarning);
|
+ '\n' + detailedWarning);
|
||||||
} else if (warnOnRelease) {
|
} else if (warnOnRelease) {
|
||||||
AsynchronousMessageBox::information(tr("Warning"),
|
AsynchronousMessageBox::information(tr("Warning"),
|
||||||
tr("This does not seem to be a \"Debug\" build.\n"
|
tr("This does not seem to be a \"Debug\" build.\n"
|
||||||
"Setting breakpoints by file name and line number may fail.")
|
"Setting breakpoints by file name and line number may fail.")
|
||||||
+ QLatin1Char('\n') + detailedWarning);
|
+ '\n' + detailedWarning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2007,7 +2006,7 @@ void DebuggerEngine::updateLocalsView(const GdbMi &all)
|
|||||||
static int count = 0;
|
static int count = 0;
|
||||||
showMessage(QString("<Rebuild Watchmodel %1 @ %2 >")
|
showMessage(QString("<Rebuild Watchmodel %1 @ %2 >")
|
||||||
.arg(++count).arg(LogWindow::logTimeStamp()), LogMiscInput);
|
.arg(++count).arg(LogWindow::logTimeStamp()), LogMiscInput);
|
||||||
showStatusMessage(GdbEngine::tr("Finished retrieving data"), 400); // FIXME: String
|
showStatusMessage(tr("Finished retrieving data"), 400);
|
||||||
|
|
||||||
DebuggerToolTipManager::updateEngine(this);
|
DebuggerToolTipManager::updateEngine(this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user