Skip to content
Snippets Groups Projects
Commit ecff29be authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Compile Windows.

parent 0344b728
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,7 @@ private:
QPointer<DebuggerEngine> m_engine;
};
class DisassemblerViewAgentPrivate;
struct DisassemblerViewAgentPrivate;
class DisassemblerViewAgent : public QObject
{
......
......@@ -122,18 +122,15 @@ public:
virtual ~DebuggerEngine();
virtual void shutdown() {}
virtual void setToolTipExpression(const QPoint &mousePos,
TextEditor::ITextEditor *editor, int cursorPos)
{ Q_UNUSED(mousePos); Q_UNUSED(editor); Q_UNUSED(cursorPos); }
virtual void setToolTipExpression(const QPoint & /* mousePos */,
TextEditor::ITextEditor * /* editor */, int /* cursorPos */) { }
void initializeFromTemplate(DebuggerEngine *other);
void startDebugger(DebuggerRunControl *runControl);
virtual void startDebugger() {}
virtual void exitDebugger() {}
virtual void abortDebugger() { exitDebugger(); }
virtual void detachDebugger() {}
virtual void updateWatchData(const WatchData &data)
{ Q_UNUSED(data); }
virtual void updateWatchData(const WatchData & /* data */) { }
virtual void executeStep() {}
virtual void executeStepOut() {}
virtual void executeNext() {}
......
......@@ -829,8 +829,8 @@ public slots:
ProjectExplorer::RunControl *createDebugger(const DebuggerStartParameters &sp);
void startDebugger(ProjectExplorer::RunControl *runControl);
void setToolTipExpression(const QPoint &mousePos,
TextEditor::ITextEditor *editor, int cursorPos)
void setToolTipExpression(const QPoint & /* mousePos */,
TextEditor::ITextEditor * /* editor */, int /* cursorPos */)
{
// FIXME
}
......
......@@ -35,6 +35,10 @@
#include "debuggerplugin.h"
#include "debuggerstringutils.h"
#ifdef Q_OS_WIN
# include "peutils.h"
#endif
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/environment.h>
#include <projectexplorer/project.h>
......@@ -50,6 +54,7 @@
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QTimer>
#include <QtCore/QStringList>
#include <QtGui/QAbstractItemView>
#include <QtGui/QTextDocument>
......@@ -257,21 +262,21 @@ DebuggerEngineType DebuggerRunControl::engineForExecutable(const QString &execut
#ifdef Q_OS_WIN
// A remote executable?
if (!executable.endsWith(_(".exe")))
return GdbEngineType
return GdbEngineType;
// If a file has PDB files, it has been compiled by VS.
QStringList pdbFiles;
if (!getPDBFiles(executable, &pdbFiles, errorMessage)) {
if (!getPDBFiles(executable, &pdbFiles, &m_errorMessage)) {
qWarning("Cannot determine type of executable %s: %s",
qPrintable(executable), qPrintable(m_errorMessage));
return 0;
return NoEngineType;
}
if (pdbFiles.empty())
return GdbEngineType;
// We need the CDB debugger in order to be able to debug VS
// executables
if (checkDebugConfiguration(ToolChain::MSVC, errorMessage, 0, &m_settingsIdHint))
if (checkDebugConfiguration(ToolChain::MSVC, &m_errorMessage, 0, &m_settingsIdHint))
return CdbEngineType;
#else
if (m_enabledEngines & GdbEngineType)
......@@ -290,10 +295,9 @@ DebuggerEngineType DebuggerRunControl::engineForMode(DebuggerStartMode startMode
#ifdef Q_OS_WIN
// Preferably Windows debugger for attaching locally.
if (startMode != AttachToRemote && cdbEngine)
if (startMode != AttachToRemote)
return CdbEngineType;
if (gdbEngine)
return GdbEngineType;
return GdbEngineType;
m_errorMessage = msgEngineNotAvailable("Gdb Engine");
return NoEngineType;
#else
......@@ -333,7 +337,7 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &sp)
if (!engineType)
engineType = engineForMode(sp.startMode);
//qDebug() << "USING ENGINE : " << engineType;
// qDebug() << "USING ENGINE : " << engineType;
switch (engineType) {
case GdbEngineType:
......@@ -513,6 +517,12 @@ bool DebuggerRunControl::isRunning() const
return m_running;
}
DebuggerState DebuggerRunControl::state() const
{
QTC_ASSERT(m_engine, return DebuggerNotReady);
return m_engine->state();
}
Internal::DebuggerEngine *DebuggerRunControl::engine()
{
QTC_ASSERT(m_engine, /**/);
......
......@@ -101,6 +101,7 @@ public:
void startSuccessful();
void debuggingFinished();
DebuggerState state() const;
Internal::DebuggerEngine *engine();
void showMessage(const QString &msg, int channel);
......
......@@ -477,7 +477,7 @@ void MaemoDebugRunControl::stopInternal()
bool MaemoDebugRunControl::isRunning() const
{
return AbstractMaemoRunControl::isRunning()
|| m_debuggerRunControl->engine()->state() != Debugger::DebuggerNotReady;
|| m_debuggerRunControl->state() != Debugger::DebuggerNotReady;
}
void MaemoDebugRunControl::debuggingFinished()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment