forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -561,7 +561,7 @@ void DebuggerManager::notifyInferiorUpdateFinished()
|
|||||||
void DebuggerManager::notifyInferiorRunningRequested()
|
void DebuggerManager::notifyInferiorRunningRequested()
|
||||||
{
|
{
|
||||||
setStatus(DebuggerInferiorRunningRequested);
|
setStatus(DebuggerInferiorRunningRequested);
|
||||||
showStatusMessage(tr("Running..."), 5000);
|
showStatusMessage(tr("Running requested..."), 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::notifyInferiorRunning()
|
void DebuggerManager::notifyInferiorRunning()
|
||||||
@@ -579,7 +579,7 @@ void DebuggerManager::notifyInferiorExited()
|
|||||||
void DebuggerManager::notifyInferiorPidChanged(int pid)
|
void DebuggerManager::notifyInferiorPidChanged(int pid)
|
||||||
{
|
{
|
||||||
//QMessageBox::warning(0, "PID", "PID: " + QString::number(pid));
|
//QMessageBox::warning(0, "PID", "PID: " + QString::number(pid));
|
||||||
//qDebug() << "PID: " << pid;
|
qDebug() << "PID: " << pid;
|
||||||
emit inferiorPidChanged(pid);
|
emit inferiorPidChanged(pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1082,22 +1082,12 @@ bool DebuggerManager::useCustomDumpers() const
|
|||||||
return m_settings.m_useCustomDumpers;
|
return m_settings.m_useCustomDumpers;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DebuggerManager::useFastStart() const
|
|
||||||
{
|
|
||||||
return 0; // && m_settings.m_useFastStart;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerManager::setUseCustomDumpers(bool on)
|
void DebuggerManager::setUseCustomDumpers(bool on)
|
||||||
{
|
{
|
||||||
m_settings.m_useCustomDumpers = on;
|
m_settings.m_useCustomDumpers = on;
|
||||||
engine()->setUseCustomDumpers(on);
|
engine()->setUseCustomDumpers(on);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::setUseFastStart(bool on)
|
|
||||||
{
|
|
||||||
m_settings.m_useFastStart = on;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerManager::setDebugDumpers(bool on)
|
void DebuggerManager::setDebugDumpers(bool on)
|
||||||
{
|
{
|
||||||
m_settings.m_debugDumpers = on;
|
m_settings.m_debugDumpers = on;
|
||||||
|
@@ -170,7 +170,11 @@ private:
|
|||||||
virtual bool skipKnownFrames() const = 0;
|
virtual bool skipKnownFrames() const = 0;
|
||||||
virtual bool debugDumpers() const = 0;
|
virtual bool debugDumpers() const = 0;
|
||||||
virtual bool useCustomDumpers() const = 0;
|
virtual bool useCustomDumpers() const = 0;
|
||||||
virtual bool useFastStart() const = 0;
|
|
||||||
|
virtual bool wantsAllPluginBreakpoints() const = 0;
|
||||||
|
virtual bool wantsSelectedPluginBreakpoints() const = 0;
|
||||||
|
virtual bool wantsNoPluginBreakpoints() const = 0;
|
||||||
|
virtual QString selectedPluginBreakpointsPattern() const = 0;
|
||||||
|
|
||||||
virtual void reloadDisassembler() = 0;
|
virtual void reloadDisassembler() = 0;
|
||||||
virtual void reloadModules() = 0;
|
virtual void reloadModules() = 0;
|
||||||
@@ -288,7 +292,6 @@ public slots:
|
|||||||
void setUseCustomDumpers(bool on);
|
void setUseCustomDumpers(bool on);
|
||||||
void setDebugDumpers(bool on);
|
void setDebugDumpers(bool on);
|
||||||
void setSkipKnownFrames(bool on);
|
void setSkipKnownFrames(bool on);
|
||||||
void setUseFastStart(bool on);
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showDebuggerOutput(const QString &prefix, const QString &msg);
|
void showDebuggerOutput(const QString &prefix, const QString &msg);
|
||||||
@@ -323,7 +326,14 @@ private:
|
|||||||
bool skipKnownFrames() const;
|
bool skipKnownFrames() const;
|
||||||
bool debugDumpers() const;
|
bool debugDumpers() const;
|
||||||
bool useCustomDumpers() const;
|
bool useCustomDumpers() const;
|
||||||
bool useFastStart() const;
|
bool wantsAllPluginBreakpoints() const
|
||||||
|
{ return m_settings.m_pluginAllBreakpoints; }
|
||||||
|
bool wantsSelectedPluginBreakpoints() const
|
||||||
|
{ return m_settings.m_pluginSelectedBreakpoints; }
|
||||||
|
bool wantsNoPluginBreakpoints() const
|
||||||
|
{ return m_settings.m_pluginNoBreakpoints; }
|
||||||
|
QString selectedPluginBreakpointsPattern() const
|
||||||
|
{ return m_settings.m_pluginSelectedBreakpointsPattern; }
|
||||||
|
|
||||||
void notifyStartupFinished();
|
void notifyStartupFinished();
|
||||||
void notifyInferiorStopped();
|
void notifyInferiorStopped();
|
||||||
|
@@ -281,6 +281,8 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
|
|||||||
setChecked(m_settings.m_pluginSelectedBreakpoints);
|
setChecked(m_settings.m_pluginSelectedBreakpoints);
|
||||||
m_ui.radioButtonNoPluginBreakpoints->
|
m_ui.radioButtonNoPluginBreakpoints->
|
||||||
setChecked(m_settings.m_pluginNoBreakpoints);
|
setChecked(m_settings.m_pluginNoBreakpoints);
|
||||||
|
m_ui.lineEditSelectedPluginBreakpointsPattern->
|
||||||
|
setText(m_settings.m_pluginSelectedBreakpointsPattern);
|
||||||
m_ui.lineEditSelectedPluginBreakpointsPattern->
|
m_ui.lineEditSelectedPluginBreakpointsPattern->
|
||||||
setEnabled(m_settings.m_pluginSelectedBreakpoints);
|
setEnabled(m_settings.m_pluginSelectedBreakpoints);
|
||||||
|
|
||||||
@@ -335,7 +337,6 @@ void GdbOptionPage::apply()
|
|||||||
m_settings.m_pluginSelectedBreakpointsPattern =
|
m_settings.m_pluginSelectedBreakpointsPattern =
|
||||||
m_ui.lineEditSelectedPluginBreakpointsPattern->text();
|
m_ui.lineEditSelectedPluginBreakpointsPattern->text();
|
||||||
|
|
||||||
|
|
||||||
*m_plugin->m_manager->settings() = m_settings;
|
*m_plugin->m_manager->settings() = m_settings;
|
||||||
m_plugin->writeSettings();
|
m_plugin->writeSettings();
|
||||||
}
|
}
|
||||||
|
@@ -99,10 +99,8 @@ enum GdbCommandType
|
|||||||
GdbQueryPwd,
|
GdbQueryPwd,
|
||||||
GdbQuerySources,
|
GdbQuerySources,
|
||||||
GdbAsyncOutput2,
|
GdbAsyncOutput2,
|
||||||
|
GdbStart,
|
||||||
GdbExecRun,
|
GdbExecRun,
|
||||||
GdbExecStart1,
|
|
||||||
GdbExecStart2,
|
|
||||||
GdbExecStart3,
|
|
||||||
GdbExecRunToFunction,
|
GdbExecRunToFunction,
|
||||||
GdbExecStep,
|
GdbExecStep,
|
||||||
GdbExecNext,
|
GdbExecNext,
|
||||||
@@ -254,7 +252,6 @@ void GdbEngine::init()
|
|||||||
{
|
{
|
||||||
m_pendingRequests = 0;
|
m_pendingRequests = 0;
|
||||||
m_gdbVersion = 100;
|
m_gdbVersion = 100;
|
||||||
m_shared = 0;
|
|
||||||
m_outputCodec = QTextCodec::codecForLocale();
|
m_outputCodec = QTextCodec::codecForLocale();
|
||||||
m_dataDumperState = DataDumperUninitialized;
|
m_dataDumperState = DataDumperUninitialized;
|
||||||
|
|
||||||
@@ -461,13 +458,28 @@ void GdbEngine::handleResponse()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case '~':
|
case '~': {
|
||||||
case '@':
|
QString data = GdbMi::parseCString(from, to);
|
||||||
|
m_pendingConsoleStreamOutput += data;
|
||||||
|
m_inbuffer = QByteArray(from, to - from);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case '@': {
|
||||||
|
QString data = GdbMi::parseCString(from, to);
|
||||||
|
m_pendingTargetStreamOutput += data;
|
||||||
|
m_inbuffer = QByteArray(from, to - from);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case '&': {
|
case '&': {
|
||||||
QString data = GdbMi::parseCString(from, to);
|
QString data = GdbMi::parseCString(from, to);
|
||||||
handleStreamOutput(data, c);
|
m_pendingLogStreamOutput += data;
|
||||||
//dump(oldfrom, from, record.toString());
|
|
||||||
m_inbuffer = QByteArray(from, to - from);
|
m_inbuffer = QByteArray(from, to - from);
|
||||||
|
// On Windows, the contents seem to depend on the debugger
|
||||||
|
// version and/or OS version used.
|
||||||
|
if (data.startsWith("warning:"))
|
||||||
|
qq->showApplicationOutput(data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -760,14 +772,8 @@ void GdbEngine::handleResult(const GdbResultRecord & record, int type,
|
|||||||
handleExecRun(record);
|
handleExecRun(record);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GdbExecStart1:
|
case GdbStart:
|
||||||
handleExecStart1(record);
|
handleStart(record);
|
||||||
break;
|
|
||||||
case GdbExecStart2:
|
|
||||||
//handleExecStart2(record);
|
|
||||||
break;
|
|
||||||
case GdbExecStart3:
|
|
||||||
handleExecStart3(record);
|
|
||||||
break;
|
break;
|
||||||
case GdbInfoProc:
|
case GdbInfoProc:
|
||||||
handleInfoProc(record);
|
handleInfoProc(record);
|
||||||
@@ -988,18 +994,6 @@ void GdbEngine::handleInfoShared(const GdbResultRecord &record)
|
|||||||
if (record.resultClass == GdbResultDone) {
|
if (record.resultClass == GdbResultDone) {
|
||||||
// let the modules handler do the parsing
|
// let the modules handler do the parsing
|
||||||
handleModulesList(record);
|
handleModulesList(record);
|
||||||
QList<Module> modules = qq->modulesHandler()->modules();
|
|
||||||
bool reloadNeeded = false;
|
|
||||||
foreach (const Module &module, modules) {
|
|
||||||
// FIXME: read this from some list
|
|
||||||
if (!module.symbolsRead && !module.moduleName.contains("Q")) {
|
|
||||||
reloadNeeded = true;
|
|
||||||
sendCommand("sharedlibrary " + dotEscape(module.moduleName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (reloadNeeded)
|
|
||||||
reloadModules();
|
|
||||||
continueInferior();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1041,84 +1035,6 @@ void GdbEngine::handleExecRunToFunction(const GdbResultRecord &record)
|
|||||||
q->gotoLocation(file, line, true);
|
q->gotoLocation(file, line, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleStreamOutput(const QString &data, char code)
|
|
||||||
{
|
|
||||||
// Linux
|
|
||||||
if (data.contains("[New Thread")) {
|
|
||||||
QRegExp re("\\[New Thread 0x([0-9a-f]*) \\(LWP ([0-9]*)\\)\\]");
|
|
||||||
if (re.indexIn(data) != -1)
|
|
||||||
maybeHandleInferiorPidChanged(re.cap(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mac
|
|
||||||
if (data.contains("[Switching to process ")) {
|
|
||||||
QRegExp re("\\[Switching to process ([0-9]*) local thread 0x([0-9a-f]*)\\]");
|
|
||||||
if (re.indexIn(data) != -1)
|
|
||||||
maybeHandleInferiorPidChanged(re.cap(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
// present it twice: now and together with the next 'real' result
|
|
||||||
switch (code) {
|
|
||||||
case '~':
|
|
||||||
m_pendingConsoleStreamOutput += data;
|
|
||||||
break;
|
|
||||||
case '@':
|
|
||||||
m_pendingTargetStreamOutput += data;
|
|
||||||
break;
|
|
||||||
case '&':
|
|
||||||
m_pendingLogStreamOutput += data;
|
|
||||||
// On Windows, the contents seem to depend on the debugger
|
|
||||||
// version and/or OS version used.
|
|
||||||
if (data.startsWith("warning:"))
|
|
||||||
qq->showApplicationOutput(data);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
if (data.startsWith("Pending break") && data.contains("\" resolved")) {
|
|
||||||
qDebug() << "SCHEDULING -break-list";
|
|
||||||
//m_breakListOnStopNeeded = true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (m_slurpingPTypeOutput)
|
|
||||||
qDebug() << "SLURP: " << output.data;
|
|
||||||
|
|
||||||
// "No symbol \"__dlopen\" in current context."
|
|
||||||
// "No symbol \"dlopen\" in current context."
|
|
||||||
if (output.data.startsWith("No symbol ")
|
|
||||||
&& output.data.contains("dlopen")) {
|
|
||||||
m_dlopened = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// output of 'ptype <foo>'
|
|
||||||
if (output.data.startsWith("type = ")) {
|
|
||||||
if (output.data.endsWith("{") || output.data.endsWith("{\\n")) {
|
|
||||||
// multi-line output started here...
|
|
||||||
m_slurpingPTypeOutput = true;
|
|
||||||
m_slurpedPTypeOutput = output.data;
|
|
||||||
} else {
|
|
||||||
// Happens for simple types. Process it immediately
|
|
||||||
m_watchHandler->handleTypeContents(output.data);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (m_slurpingPTypeOutput) {
|
|
||||||
m_slurpedPTypeOutput += '\n';
|
|
||||||
m_slurpedPTypeOutput += output.data;
|
|
||||||
if (output.data.startsWith("}")) {
|
|
||||||
// this is the last line...
|
|
||||||
m_slurpingPTypeOutput = false;
|
|
||||||
m_watchHandler->handleTypeContents(m_slurpedPTypeOutput);
|
|
||||||
m_slurpedPTypeOutput.clear();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isExitedReason(const QString &reason)
|
static bool isExitedReason(const QString &reason)
|
||||||
{
|
{
|
||||||
return reason == QLatin1String("exited-normally") // inferior exited normally
|
return reason == QLatin1String("exited-normally") // inferior exited normally
|
||||||
@@ -1146,7 +1062,7 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
|
|||||||
{
|
{
|
||||||
const QString reason = data.findChild("reason").data();
|
const QString reason = data.findChild("reason").data();
|
||||||
|
|
||||||
QString console = data.findChild("consolestreamoutput").data();
|
QString msg = data.findChild("consolestreamoutput").data();
|
||||||
if (reason.isEmpty()) {
|
if (reason.isEmpty()) {
|
||||||
GdbMi frame = data.findChild("frame");
|
GdbMi frame = data.findChild("frame");
|
||||||
if (frame.findChild("func").data() == "_start") {
|
if (frame.findChild("func").data() == "_start") {
|
||||||
@@ -1162,11 +1078,27 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
|
|||||||
sendCommand("info pid", GdbInfoProc, QVariant(), true);
|
sendCommand("info pid", GdbInfoProc, QVariant(), true);
|
||||||
#endif
|
#endif
|
||||||
sendCommand("-file-list-exec-source-files", GdbQuerySources);
|
sendCommand("-file-list-exec-source-files", GdbQuerySources);
|
||||||
sendCommand("set auto-solib-add on");
|
|
||||||
sendCommand("sharedlibrary libc"); // for malloc
|
sendCommand("sharedlibrary libc"); // for malloc
|
||||||
sendCommand("sharedlibrary libdl"); // for dlopen
|
sendCommand("sharedlibrary libdl"); // for dlopen
|
||||||
tryLoadCustomDumpers();
|
tryLoadCustomDumpers();
|
||||||
sendCommand("info shared", ModulesList, QVariant());
|
|
||||||
|
// intentionally after tryLoadCustomDumpers(),
|
||||||
|
// otherwise we'd interupt solib loading.
|
||||||
|
if (qq->wantsAllPluginBreakpoints()) {
|
||||||
|
sendCommand("set auto-solib-add on");
|
||||||
|
sendCommand("set stop-on-solib-events 0");
|
||||||
|
sendCommand("sharedlibrary .*");
|
||||||
|
} else if (qq->wantsSelectedPluginBreakpoints()) {
|
||||||
|
sendCommand("set auto-solib-add on");
|
||||||
|
sendCommand("set stop-on-solib-events 1");
|
||||||
|
sendCommand("sharedlibrary "+qq->selectedPluginBreakpointsPattern());
|
||||||
|
} else if (qq->wantsNoPluginBreakpoints()) {
|
||||||
|
// should be like that already
|
||||||
|
sendCommand("set auto-solib-add off");
|
||||||
|
sendCommand("set stop-on-solib-events 0");
|
||||||
|
}
|
||||||
|
reloadModules();
|
||||||
// this will "continue" if done
|
// this will "continue" if done
|
||||||
attemptBreakpointSynchronization();
|
attemptBreakpointSynchronization();
|
||||||
return;
|
return;
|
||||||
@@ -1174,36 +1106,19 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
|
|||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
static bool modulesDirty = false;
|
||||||
if (console.contains("Stopped due to shared library event") || reason.isEmpty()) {
|
if (msg.contains("Stopped due to shared library event") || reason.isEmpty()) {
|
||||||
++m_shared;
|
if (qq->wantsSelectedPluginBreakpoints()) {
|
||||||
//if (m_shared == 2)
|
qDebug() << "SHARED LIBRARY EVENT " << data.toString();
|
||||||
// tryLoadCustomDumpers();
|
qDebug() << "PATTERN" << qq->selectedPluginBreakpointsPattern();
|
||||||
//qDebug() << "SHARED LIBRARY EVENT " << data.toString() << m_shared;
|
sendCommand("sharedlibrary " + qq->selectedPluginBreakpointsPattern());
|
||||||
if (qq->useFastStart()) {
|
|
||||||
if (1 || m_shared <= 16) { // libpthread?
|
|
||||||
sendCommand("info shared", GdbInfoShared);
|
|
||||||
//sendCommand("sharedlibrary gdbdebugger ");
|
|
||||||
//continueInferior();
|
|
||||||
} else {
|
|
||||||
// auto-load from now on
|
|
||||||
sendCommand("info shared");
|
|
||||||
sendCommand("set auto-solib-add on");
|
|
||||||
sendCommand("-file-list-exec-source-files", GdbQuerySources);
|
|
||||||
sendCommand("-break-list", BreakList);
|
|
||||||
//sendCommand("bt");
|
|
||||||
//QVariant var = QVariant::fromValue<GdbMi>(data);
|
|
||||||
//sendCommand("p 1", GdbAsyncOutput2, var); // dummy
|
|
||||||
continueInferior();
|
continueInferior();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// slow start requested.
|
|
||||||
q->showStatusMessage(tr("Loading %1...").arg(QString(data.toString())));
|
q->showStatusMessage(tr("Loading %1...").arg(QString(data.toString())));
|
||||||
continueInferior();
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
modulesDirty = true;
|
||||||
|
// fall through
|
||||||
|
}
|
||||||
|
|
||||||
if (isExitedReason(reason)) {
|
if (isExitedReason(reason)) {
|
||||||
qq->notifyInferiorExited();
|
qq->notifyInferiorExited();
|
||||||
@@ -1256,11 +1171,17 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isStoppedReason(reason) || reason.isEmpty()) {
|
if (isStoppedReason(reason) || reason.isEmpty()) {
|
||||||
|
if (modulesDirty) {
|
||||||
|
sendCommand("-file-list-exec-source-files", GdbQuerySources);
|
||||||
|
sendCommand("-break-list", BreakList);
|
||||||
|
reloadModules();
|
||||||
|
modulesDirty = false;
|
||||||
|
}
|
||||||
// Need another round trip
|
// Need another round trip
|
||||||
if (reason == "breakpoint-hit") {
|
if (reason == "breakpoint-hit") {
|
||||||
q->showStatusMessage(tr("Stopped at breakpoint"));
|
q->showStatusMessage(tr("Stopped at breakpoint"));
|
||||||
GdbMi frame = data.findChild("frame");
|
GdbMi frame = data.findChild("frame");
|
||||||
qDebug() << "HIT BREAKPOINT: " << frame.toString();
|
//qDebug() << "HIT BREAKPOINT: " << frame.toString();
|
||||||
m_currentFrame = frame.findChild("addr").data() + '%' +
|
m_currentFrame = frame.findChild("addr").data() + '%' +
|
||||||
frame.findChild("func").data() + '%';
|
frame.findChild("func").data() + '%';
|
||||||
|
|
||||||
@@ -1504,7 +1425,6 @@ void GdbEngine::exitDebugger()
|
|||||||
m_fullToShortName.clear();
|
m_fullToShortName.clear();
|
||||||
m_varToType.clear();
|
m_varToType.clear();
|
||||||
m_dataDumperState = DataDumperUninitialized;
|
m_dataDumperState = DataDumperUninitialized;
|
||||||
m_shared = 0;
|
|
||||||
m_outputCollector.shutdown();
|
m_outputCollector.shutdown();
|
||||||
//q->settings()->m_debugDumpers = false;
|
//q->settings()->m_debugDumpers = false;
|
||||||
}
|
}
|
||||||
@@ -1572,12 +1492,7 @@ bool GdbEngine::startDebugger()
|
|||||||
q->showStatusMessage(tr("Gdb Running"));
|
q->showStatusMessage(tr("Gdb Running"));
|
||||||
|
|
||||||
sendCommand("show version", GdbShowVersion);
|
sendCommand("show version", GdbShowVersion);
|
||||||
if (qq->useFastStart()) {
|
|
||||||
sendCommand("set auto-solib-add off");
|
|
||||||
sendCommand("set stop-on-solib-events 1");
|
|
||||||
}
|
|
||||||
//sendCommand("-enable-timings");
|
//sendCommand("-enable-timings");
|
||||||
//sendCommand("set stop-on-solib-events 1");
|
|
||||||
sendCommand("set print static-members off"); // Seemingly doesn't work.
|
sendCommand("set print static-members off"); // Seemingly doesn't work.
|
||||||
//sendCommand("define hook-stop\n-thread-list-ids\n-stack-list-frames\nend");
|
//sendCommand("define hook-stop\n-thread-list-ids\n-stack-list-frames\nend");
|
||||||
//sendCommand("define hook-stop\nprint 4\nend");
|
//sendCommand("define hook-stop\nprint 4\nend");
|
||||||
@@ -1647,13 +1562,17 @@ bool GdbEngine::startDebugger()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (q->startMode() == q->startInternal) {
|
if (q->startMode() == q->startInternal) {
|
||||||
|
emit gdbInputAvailable(QString(), QString());
|
||||||
sendCommand("-file-exec-and-symbols " + fileName, GdbFileExecAndSymbols);
|
sendCommand("-file-exec-and-symbols " + fileName, GdbFileExecAndSymbols);
|
||||||
//sendCommand("file " + fileName, GdbFileExecAndSymbols);
|
//sendCommand("file " + fileName, GdbFileExecAndSymbols);
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
sendCommand("sharedlibrary apply-load-rules all");
|
sendCommand("sharedlibrary apply-load-rules all");
|
||||||
#endif
|
#endif
|
||||||
//sendCommand("-gdb-set stop-on-solib-events 1");
|
setTokenBarrier();
|
||||||
runInferior();
|
if (!q->m_processArgs.isEmpty())
|
||||||
|
sendCommand("-exec-arguments " + q->m_processArgs.join(" "));
|
||||||
|
sendCommand("set auto-solib-add off");
|
||||||
|
sendCommand("x/2i _start", GdbStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (q->startMode() == q->attachExternal) {
|
if (q->startMode() == q->attachExternal) {
|
||||||
@@ -1692,21 +1611,7 @@ void GdbEngine::continueInferior()
|
|||||||
sendCommand("-exec-continue", GdbExecContinue);
|
sendCommand("-exec-continue", GdbExecContinue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::runInferior()
|
void GdbEngine::handleStart(const GdbResultRecord &response)
|
||||||
{
|
|
||||||
q->resetLocation();
|
|
||||||
// FIXME: this ignores important startup messages
|
|
||||||
setTokenBarrier();
|
|
||||||
if (!q->m_processArgs.isEmpty())
|
|
||||||
sendCommand("-exec-arguments " + q->m_processArgs.join(" "));
|
|
||||||
qq->notifyInferiorRunningRequested();
|
|
||||||
emit gdbInputAvailable(QString(), QString());
|
|
||||||
|
|
||||||
sendCommand("set auto-solib-add off");
|
|
||||||
sendCommand("x/2i _start", GdbExecStart1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GdbEngine::handleExecStart1(const GdbResultRecord &response)
|
|
||||||
{
|
{
|
||||||
if (response.resultClass == GdbResultDone) {
|
if (response.resultClass == GdbResultDone) {
|
||||||
// stdout:&"x/2i _start\n"
|
// stdout:&"x/2i _start\n"
|
||||||
@@ -1716,8 +1621,9 @@ void GdbEngine::handleExecStart1(const GdbResultRecord &response)
|
|||||||
QRegExp needle("0x([0-9a-f]+) <_start\\+.*>:");
|
QRegExp needle("0x([0-9a-f]+) <_start\\+.*>:");
|
||||||
if (needle.indexIn(msg) != -1) {
|
if (needle.indexIn(msg) != -1) {
|
||||||
//qDebug() << "STREAM: " << msg << needle.cap(1);
|
//qDebug() << "STREAM: " << msg << needle.cap(1);
|
||||||
sendCommand("tbreak *0x" + needle.cap(1)); // GdbExecStart3);
|
sendCommand("tbreak *0x" + needle.cap(1));
|
||||||
sendCommand("-exec-run"); // GdbExecStart3);
|
sendCommand("-exec-run");
|
||||||
|
qq->notifyInferiorRunningRequested();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "PARSING START ADDRESS FAILED" << msg;
|
qDebug() << "PARSING START ADDRESS FAILED" << msg;
|
||||||
}
|
}
|
||||||
@@ -1726,20 +1632,6 @@ void GdbEngine::handleExecStart1(const GdbResultRecord &response)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleExecStart3(const GdbResultRecord &)
|
|
||||||
{
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
sendCommand("info proc", GdbInfoProc);
|
|
||||||
#endif
|
|
||||||
#if defined(Q_OS_LINUX)
|
|
||||||
sendCommand("info proc", GdbInfoProc);
|
|
||||||
#endif
|
|
||||||
#if defined(Q_OS_MAC)
|
|
||||||
sendCommand("info pid", GdbInfoProc, QVariant(), true);
|
|
||||||
#endif
|
|
||||||
attemptBreakpointSynchronization();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GdbEngine::stepExec()
|
void GdbEngine::stepExec()
|
||||||
{
|
{
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
@@ -2258,12 +2150,7 @@ void GdbEngine::attemptBreakpointSynchronization()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updateNeeded) {
|
if (!updateNeeded) {
|
||||||
//interruptAndContinue();
|
|
||||||
//sendListBreakpoints();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!updateNeeded && q->status() == DebuggerProcessStartingUp) {
|
|
||||||
// we continue the execution
|
// we continue the execution
|
||||||
continueInferior();
|
continueInferior();
|
||||||
}
|
}
|
||||||
@@ -4031,7 +3918,6 @@ void GdbEngine::assignValueInDebugger(const QString &expression, const QString &
|
|||||||
sendCommand("-var-assign assign " + value, WatchVarAssign);
|
sendCommand("-var-assign assign " + value, WatchVarAssign);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GdbEngine::tryLoadCustomDumpers()
|
void GdbEngine::tryLoadCustomDumpers()
|
||||||
{
|
{
|
||||||
if (m_dataDumperState != DataDumperUninitialized)
|
if (m_dataDumperState != DataDumperUninitialized)
|
||||||
@@ -4044,8 +3930,6 @@ void GdbEngine::tryLoadCustomDumpers()
|
|||||||
QString lib = q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.so";
|
QString lib = q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.so";
|
||||||
if (QFileInfo(lib).isExecutable()) {
|
if (QFileInfo(lib).isExecutable()) {
|
||||||
//sendCommand("p dlopen");
|
//sendCommand("p dlopen");
|
||||||
//if (qq->useFastStart())
|
|
||||||
// sendCommand("set stop-on-solib-events 0");
|
|
||||||
QString flag = QString::number(RTLD_NOW);
|
QString flag = QString::number(RTLD_NOW);
|
||||||
sendSynchronizedCommand("call (void)dlopen(\"" + lib + "\", " + flag + ")",
|
sendSynchronizedCommand("call (void)dlopen(\"" + lib + "\", " + flag + ")",
|
||||||
WatchDumpCustomSetup);
|
WatchDumpCustomSetup);
|
||||||
@@ -4053,8 +3937,6 @@ void GdbEngine::tryLoadCustomDumpers()
|
|||||||
sendSynchronizedCommand("call (void)__dlopen(\"" + lib + "\", " + flag + ")",
|
sendSynchronizedCommand("call (void)__dlopen(\"" + lib + "\", " + flag + ")",
|
||||||
WatchDumpCustomSetup);
|
WatchDumpCustomSetup);
|
||||||
sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
|
sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
|
||||||
//if (qq->useFastStart())
|
|
||||||
// sendCommand("set stop-on-solib-events 1");
|
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
|
qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
|
||||||
<< lib << QFileInfo(lib).isExecutable();
|
<< lib << QFileInfo(lib).isExecutable();
|
||||||
@@ -4064,14 +3946,10 @@ void GdbEngine::tryLoadCustomDumpers()
|
|||||||
QString lib = q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.dylib";
|
QString lib = q->m_buildDir + "/qtc-gdbmacros/libgdbmacros.dylib";
|
||||||
if (QFileInfo(lib).isExecutable()) {
|
if (QFileInfo(lib).isExecutable()) {
|
||||||
//sendCommand("p dlopen"); // FIXME: remove me
|
//sendCommand("p dlopen"); // FIXME: remove me
|
||||||
//if (qq->useFastStart())
|
|
||||||
// sendCommand("set stop-on-solib-events 0");
|
|
||||||
QString flag = QString::number(RTLD_NOW);
|
QString flag = QString::number(RTLD_NOW);
|
||||||
sendSynchronizedCommand("call (void)dlopen(\"" + lib + "\", " + flag + ")",
|
sendSynchronizedCommand("call (void)dlopen(\"" + lib + "\", " + flag + ")",
|
||||||
WatchDumpCustomSetup);
|
WatchDumpCustomSetup);
|
||||||
sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
|
sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
|
||||||
//if (qq->useFastStart())
|
|
||||||
// sendCommand("set stop-on-solib-events 1");
|
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
|
qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
|
||||||
<< lib << QFileInfo(lib).isExecutable();
|
<< lib << QFileInfo(lib).isExecutable();
|
||||||
@@ -4080,15 +3958,11 @@ void GdbEngine::tryLoadCustomDumpers()
|
|||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
QString lib = q->m_buildDir + "/qtc-gdbmacros/debug/gdbmacros.dll";
|
QString lib = q->m_buildDir + "/qtc-gdbmacros/debug/gdbmacros.dll";
|
||||||
if (QFileInfo(lib).exists()) {
|
if (QFileInfo(lib).exists()) {
|
||||||
//if (qq->useFastStart())
|
|
||||||
// sendCommand("set stop-on-solib-events 0");
|
|
||||||
//sendCommand("handle SIGSEGV pass stop print");
|
//sendCommand("handle SIGSEGV pass stop print");
|
||||||
//sendCommand("set unwindonsignal off");
|
//sendCommand("set unwindonsignal off");
|
||||||
sendSynchronizedCommand("call LoadLibraryA(\"" + lib + "\")",
|
sendSynchronizedCommand("call LoadLibraryA(\"" + lib + "\")",
|
||||||
WatchDumpCustomSetup);
|
WatchDumpCustomSetup);
|
||||||
sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
|
sendSynchronizedCommand("sharedlibrary " + dotEscape(lib));
|
||||||
//if (qq->useFastStart())
|
|
||||||
// sendCommand("set stop-on-solib-events 1");
|
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
|
qDebug() << "DEBUG HELPER LIBRARY IS NOT USABLE: "
|
||||||
<< lib << QFileInfo(lib).isExecutable();
|
<< lib << QFileInfo(lib).isExecutable();
|
||||||
|
@@ -113,7 +113,6 @@ private:
|
|||||||
void exitDebugger();
|
void exitDebugger();
|
||||||
|
|
||||||
void continueInferior();
|
void continueInferior();
|
||||||
void runInferior();
|
|
||||||
void interruptInferior();
|
void interruptInferior();
|
||||||
|
|
||||||
void runToLineExec(const QString &fileName, int lineNumber);
|
void runToLineExec(const QString &fileName, int lineNumber);
|
||||||
@@ -179,14 +178,12 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int terminationIndex(const QByteArray &buffer, int &length);
|
int terminationIndex(const QByteArray &buffer, int &length);
|
||||||
void handleStreamOutput(const QString &output, char code);
|
void handleStart(const GdbResultRecord &response);
|
||||||
void handleAsyncOutput2(const GdbMi &data);
|
void handleAsyncOutput2(const GdbMi &data);
|
||||||
void handleAsyncOutput(const GdbMi &data);
|
void handleAsyncOutput(const GdbMi &data);
|
||||||
void handleResultRecord(const GdbResultRecord &response);
|
void handleResultRecord(const GdbResultRecord &response);
|
||||||
void handleFileExecAndSymbols(const GdbResultRecord &response);
|
void handleFileExecAndSymbols(const GdbResultRecord &response);
|
||||||
void handleExecRun(const GdbResultRecord &response);
|
void handleExecRun(const GdbResultRecord &response);
|
||||||
void handleExecStart1(const GdbResultRecord &response);
|
|
||||||
void handleExecStart3(const GdbResultRecord &response);
|
|
||||||
void handleExecJumpToLine(const GdbResultRecord &response);
|
void handleExecJumpToLine(const GdbResultRecord &response);
|
||||||
void handleExecRunToFunction(const GdbResultRecord &response);
|
void handleExecRunToFunction(const GdbResultRecord &response);
|
||||||
void handleInfoShared(const GdbResultRecord &response);
|
void handleInfoShared(const GdbResultRecord &response);
|
||||||
@@ -217,7 +214,6 @@ private:
|
|||||||
int m_oldestAcceptableToken;
|
int m_oldestAcceptableToken;
|
||||||
|
|
||||||
int m_gdbVersion; // 6.8.0 is 680
|
int m_gdbVersion; // 6.8.0 is 680
|
||||||
int m_shared;
|
|
||||||
|
|
||||||
// awful hack to keep track of used files
|
// awful hack to keep track of used files
|
||||||
QHash<QString, QString> m_shortToFullName;
|
QHash<QString, QString> m_shortToFullName;
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Locations</string>
|
<string>Locations</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
|
@@ -62,7 +62,6 @@ public:
|
|||||||
virtual void nextIExec() = 0;
|
virtual void nextIExec() = 0;
|
||||||
|
|
||||||
virtual void continueInferior() = 0;
|
virtual void continueInferior() = 0;
|
||||||
virtual void runInferior() = 0;
|
|
||||||
virtual void interruptInferior() = 0;
|
virtual void interruptInferior() = 0;
|
||||||
|
|
||||||
virtual void runToLineExec(const QString &fileName, int lineNumber) = 0;
|
virtual void runToLineExec(const QString &fileName, int lineNumber) = 0;
|
||||||
|
@@ -170,16 +170,24 @@ bool MinGWToolChain::equals(ToolChain *other) const
|
|||||||
|
|
||||||
void MinGWToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
void MinGWToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
||||||
{
|
{
|
||||||
|
//qDebug()<<"MinGWToolChain::addToEnvironment";
|
||||||
QString binDir = m_mingwPath + "/bin";
|
QString binDir = m_mingwPath + "/bin";
|
||||||
if (QFileInfo(binDir).exists())
|
if (QFileInfo(binDir).exists())
|
||||||
env.prependOrSetPath(binDir);
|
env.prependOrSetPath(binDir);
|
||||||
|
// if (QFileInfo(binDir).exists())
|
||||||
|
// qDebug()<<"Adding "<<binDir<<" to the PATH";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MSVCToolChain::MSVCToolChain(const QString &name)
|
MSVCToolChain::MSVCToolChain(const QString &name)
|
||||||
: m_name(name), m_valuesSet(false)
|
: m_name(name), m_valuesSet(false)
|
||||||
{
|
{
|
||||||
|
if (m_name.isEmpty()) { // Could be because system qt doesn't set this
|
||||||
|
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7",
|
||||||
|
QSettings::NativeFormat);
|
||||||
|
if (registry.allKeys().count())
|
||||||
|
m_name = registry.allKeys().first();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolChain::ToolChainType MSVCToolChain::type() const
|
ToolChain::ToolChainType MSVCToolChain::type() const
|
||||||
@@ -211,10 +219,11 @@ QList<HeaderPath> MSVCToolChain::systemHeaderPaths()
|
|||||||
//TODO fix this code
|
//TODO fix this code
|
||||||
ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
|
ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
|
||||||
addToEnvironment(env);
|
addToEnvironment(env);
|
||||||
#ifdef QTCREATOR_WITH_MSVC_INCLUDES
|
QList<HeaderPath> headerPaths;
|
||||||
return env.value("INCLUDE").split(QLatin1Char(';'));
|
foreach(const QString &path, env.value("INCLUDE").split(QLatin1Char(';'))) {
|
||||||
#endif
|
headerPaths.append(HeaderPath(path, HeaderPath::GlobalHeaderPath));
|
||||||
return QList<HeaderPath>();
|
}
|
||||||
|
return headerPaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
||||||
@@ -222,6 +231,8 @@ void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
|||||||
if (!m_valuesSet) {
|
if (!m_valuesSet) {
|
||||||
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7",
|
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7",
|
||||||
QSettings::NativeFormat);
|
QSettings::NativeFormat);
|
||||||
|
if (m_name.isEmpty())
|
||||||
|
return;
|
||||||
QString path = registry.value(m_name).toString();
|
QString path = registry.value(m_name).toString();
|
||||||
ProjectExplorer::Environment oldEnv(env);
|
ProjectExplorer::Environment oldEnv(env);
|
||||||
QString desc;
|
QString desc;
|
||||||
@@ -264,11 +275,12 @@ void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
|||||||
m_valuesSet = true;
|
m_valuesSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//qDebug()<<"MSVC Environment:";
|
||||||
QList< QPair<QString, QString> >::const_iterator it, end;
|
QList< QPair<QString, QString> >::const_iterator it, end;
|
||||||
end = m_values.constEnd();
|
end = m_values.constEnd();
|
||||||
for (it = m_values.constBegin(); it != end; ++it) {
|
for (it = m_values.constBegin(); it != end; ++it) {
|
||||||
env.set((*it).first, (*it).second);
|
env.set((*it).first, (*it).second);
|
||||||
qDebug()<<"variable:"<<(*it).first<<"value:"<<(*it).second;
|
//qDebug()<<"variable:"<<(*it).first<<"value:"<<(*it).second;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -325,4 +337,6 @@ void WinCEToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
|||||||
CeSdkHandler cesdkhandler;
|
CeSdkHandler cesdkhandler;
|
||||||
cesdkhandler.parse(path);
|
cesdkhandler.parse(path);
|
||||||
cesdkhandler.find(m_platform).addToEnvironment(env);
|
cesdkhandler.find(m_platform).addToEnvironment(env);
|
||||||
|
//qDebug()<<"WinCE Final Environment:";
|
||||||
|
//qDebug()<<env.toStringList();
|
||||||
}
|
}
|
||||||
|
@@ -404,6 +404,7 @@ void Qt4Project::scheduleUpdateCodeModel()
|
|||||||
|
|
||||||
ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfiguration) const
|
ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfiguration) const
|
||||||
{
|
{
|
||||||
|
qDebug()<<"Qt4Project::toolChain() for buildconfiguration:"<<buildConfiguration;
|
||||||
Q_UNUSED(buildConfiguration);
|
Q_UNUSED(buildConfiguration);
|
||||||
ToolChain *m_test;
|
ToolChain *m_test;
|
||||||
QtVersion *version = qtVersion(activeBuildConfiguration());
|
QtVersion *version = qtVersion(activeBuildConfiguration());
|
||||||
@@ -415,10 +416,13 @@ ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfigurat
|
|||||||
qtVersion(activeBuildConfiguration())->addToEnvironment(env);
|
qtVersion(activeBuildConfiguration())->addToEnvironment(env);
|
||||||
qmake_cxx = env.searchInPath(qmake_cxx);
|
qmake_cxx = env.searchInPath(qmake_cxx);
|
||||||
m_test = ToolChain::createMinGWToolChain(qmake_cxx, version->mingwDirectory());
|
m_test = ToolChain::createMinGWToolChain(qmake_cxx, version->mingwDirectory());
|
||||||
|
qDebug()<<"Mingw ToolChain";
|
||||||
} else if(t == ToolChain::MSVC) {
|
} else if(t == ToolChain::MSVC) {
|
||||||
m_test = ToolChain::createMSVCToolChain(version->msvcVersion());
|
m_test = ToolChain::createMSVCToolChain(version->msvcVersion());
|
||||||
|
//qDebug()<<"MSVC ToolChain ("<<version->msvcVersion()<<")";
|
||||||
} else if(t == ToolChain::WINCE) {
|
} else if(t == ToolChain::WINCE) {
|
||||||
m_test = ToolChain::createWinCEToolChain(version->msvcVersion(), version->wincePlatform());
|
m_test = ToolChain::createWinCEToolChain(version->msvcVersion(), version->wincePlatform());
|
||||||
|
//qDebug()<<"WinCE ToolChain ("<<version->msvcVersion()<<","<<version->wincePlatform()<<")";
|
||||||
} else if(t == ToolChain::GCC || t == ToolChain::LinuxICC) {
|
} else if(t == ToolChain::GCC || t == ToolChain::LinuxICC) {
|
||||||
QStringList list = rootProjectNode()->variableValue(Internal::CxxCompilerVar);
|
QStringList list = rootProjectNode()->variableValue(Internal::CxxCompilerVar);
|
||||||
QString qmake_cxx = list.isEmpty() ? QString::null : list.first();
|
QString qmake_cxx = list.isEmpty() ? QString::null : list.first();
|
||||||
@@ -426,8 +430,14 @@ ProjectExplorer::ToolChain *Qt4Project::toolChain(const QString &buildConfigurat
|
|||||||
qtVersion(activeBuildConfiguration())->addToEnvironment(env);
|
qtVersion(activeBuildConfiguration())->addToEnvironment(env);
|
||||||
qmake_cxx = env.searchInPath(qmake_cxx);
|
qmake_cxx = env.searchInPath(qmake_cxx);
|
||||||
m_test = ToolChain::createGccToolChain(qmake_cxx);
|
m_test = ToolChain::createGccToolChain(qmake_cxx);
|
||||||
|
//qDebug()<<"GCC ToolChain ("<<qmake_cxx<<")";
|
||||||
|
} else {
|
||||||
|
qDebug()<<"Could not detect ToolChain for"<<version->mkspec();
|
||||||
|
qDebug()<<"Qt Creator doesn't know about the system includes, nor the systems defines.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (m_test == m_toolChain) {
|
if (m_test == m_toolChain) {
|
||||||
delete m_test;
|
delete m_test;
|
||||||
} else {
|
} else {
|
||||||
@@ -462,6 +472,12 @@ void Qt4Project::updateCodeModel()
|
|||||||
if (tc) {
|
if (tc) {
|
||||||
predefinedMacros = tc->predefinedMacros();
|
predefinedMacros = tc->predefinedMacros();
|
||||||
allHeaderPaths = tc->systemHeaderPaths();
|
allHeaderPaths = tc->systemHeaderPaths();
|
||||||
|
//qDebug()<<"Predifined Macros";
|
||||||
|
//qDebug()<<tc->predefinedMacros();
|
||||||
|
//qDebug()<<"";
|
||||||
|
//qDebug()<<"System Header Paths";
|
||||||
|
//foreach(const HeaderPath &hp, tc->systemHeaderPaths())
|
||||||
|
// qDebug()<<hp.path();
|
||||||
}
|
}
|
||||||
foreach (HeaderPath headerPath, allHeaderPaths) {
|
foreach (HeaderPath headerPath, allHeaderPaths) {
|
||||||
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
|
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
|
||||||
@@ -869,14 +885,14 @@ void Qt4Project::checkForDeletedApplicationProjects()
|
|||||||
foreach (Qt4ProFileNode * node, applicationProFiles())
|
foreach (Qt4ProFileNode * node, applicationProFiles())
|
||||||
paths.append(node->path());
|
paths.append(node->path());
|
||||||
|
|
||||||
qDebug()<<"Still existing paths :"<<paths;
|
// qDebug()<<"Still existing paths :"<<paths;
|
||||||
|
|
||||||
QList<QSharedPointer<Qt4RunConfiguration> > removeList;
|
QList<QSharedPointer<Qt4RunConfiguration> > removeList;
|
||||||
foreach (QSharedPointer<RunConfiguration> rc, runConfigurations()) {
|
foreach (QSharedPointer<RunConfiguration> rc, runConfigurations()) {
|
||||||
if (QSharedPointer<Qt4RunConfiguration> qt4rc = rc.dynamicCast<Qt4RunConfiguration>()) {
|
if (QSharedPointer<Qt4RunConfiguration> qt4rc = rc.dynamicCast<Qt4RunConfiguration>()) {
|
||||||
if (!paths.contains(qt4rc->proFilePath())) {
|
if (!paths.contains(qt4rc->proFilePath())) {
|
||||||
removeList.append(qt4rc);
|
removeList.append(qt4rc);
|
||||||
qDebug()<<"Removing runConfiguration for "<<qt4rc->proFilePath();
|
// qDebug()<<"Removing runConfiguration for "<<qt4rc->proFilePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1183,15 +1183,16 @@ ProjectExplorer::ToolChain::ToolChainType QtVersion::toolchainType() const
|
|||||||
if (!isValid())
|
if (!isValid())
|
||||||
return ProjectExplorer::ToolChain::INVALID;
|
return ProjectExplorer::ToolChain::INVALID;
|
||||||
const QString &spec = mkspec();
|
const QString &spec = mkspec();
|
||||||
|
// qDebug()<<"spec="<<spec;
|
||||||
if (spec.contains("win32-msvc") || spec.contains(QLatin1String("win32-icc")))
|
if (spec.contains("win32-msvc") || spec.contains(QLatin1String("win32-icc")))
|
||||||
return ProjectExplorer::ToolChain::MSVC;
|
return ProjectExplorer::ToolChain::MSVC;
|
||||||
else if (spec == "win32-g++")
|
else if (spec.contains("win32-g++"))
|
||||||
return ProjectExplorer::ToolChain::MinGW;
|
return ProjectExplorer::ToolChain::MinGW;
|
||||||
else if (spec == QString::null)
|
else if (spec == QString::null)
|
||||||
return ProjectExplorer::ToolChain::INVALID;
|
return ProjectExplorer::ToolChain::INVALID;
|
||||||
else if (spec.startsWith("wince"))
|
else if (spec.contains("wince"))
|
||||||
return ProjectExplorer::ToolChain::WINCE;
|
return ProjectExplorer::ToolChain::WINCE;
|
||||||
else if (spec.startsWith("linux-icc"))
|
else if (spec.contains("linux-icc"))
|
||||||
return ProjectExplorer::ToolChain::LinuxICC;
|
return ProjectExplorer::ToolChain::LinuxICC;
|
||||||
else
|
else
|
||||||
return ProjectExplorer::ToolChain::GCC;
|
return ProjectExplorer::ToolChain::GCC;
|
||||||
@@ -1224,7 +1225,7 @@ QString QtVersion::msvcVersion() const
|
|||||||
|
|
||||||
QString QtVersion::wincePlatform() const
|
QString QtVersion::wincePlatform() const
|
||||||
{
|
{
|
||||||
qDebug()<<"QtVersion::wincePlatform returning"<<ProjectExplorer::CeSdkHandler::platformName(mkspecPath() + "/qmake.conf");
|
// qDebug()<<"QtVersion::wincePlatform returning"<<ProjectExplorer::CeSdkHandler::platformName(mkspecPath() + "/qmake.conf");
|
||||||
return ProjectExplorer::CeSdkHandler::platformName(mkspecPath() + "/qmake.conf");
|
return ProjectExplorer::CeSdkHandler::platformName(mkspecPath() + "/qmake.conf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user