Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0.9.1-beta
  • 0.9.2-rc1
  • 1.0.0
  • 1.1
  • 1.2
  • 1.2.90
  • 1.3
  • 1.3.0
  • 1.3.0-beta
  • 1.3.1
  • 2.0
  • 2.0.0
  • 2.0.0-beta
  • 2.0.1
  • 2.1
  • 2.1.0
  • 2.2
  • 2.3
  • 2.4
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 4.0
  • 4.1
  • 4.2
  • 4.3
  • 4.4
  • 4.5
  • at-3.4
  • at-3.5
  • at-3.6
  • at-master
  • csa-3.3
  • csa-3.4
  • csa-3.5
  • csa-3.6
  • csa-master
  • master
  • qp-2.8
  • qp-3.0
  • qp-3.1
  • qp-3.2
  • qp-3.3
  • qp-3.4
  • qp-3.5
  • qp-3.6
  • qp-master
  • wip/boostbuildprojectmanager
  • wip/clang-query
  • wip/vcproj
  • at-v3.4.0
  • at-v3.4.0-beta1
  • at-v3.4.0-rc1
  • at-v3.4.1
  • at-v3.4.2
  • at-v3.5.0
  • at-v3.5.0-beta1
  • at-v3.5.0-rc1
  • at-v3.5.1
  • at-v3.6.0
  • at-v3.6.0-beta1
  • at-v3.6.0-rc1
  • csa-v3.3.0
  • csa-v3.3.0-beta1
  • csa-v3.3.0-rc1
  • csa-v3.3.1
  • csa-v3.3.2
  • csa-v3.4.0
  • csa-v3.4.0-beta1
  • csa-v3.4.0-rc1
  • csa-v3.4.1
  • csa-v3.4.2
  • csa-v3.5.0
  • csa-v3.5.0-beta1
  • csa-v3.5.0-rc1
  • csa-v3.5.1
  • csa-v3.6.0
  • csa-v3.6.0-beta1
  • csa-v3.6.0-rc1
  • qp-v3.1.0
  • qp-v3.1.0-beta1
  • qp-v3.2.0
  • qp-v3.2.0-beta1
  • qp-v3.2.1
  • qp-v3.2.2
  • qp-v3.3.0
  • qp-v3.3.0-beta1
  • qp-v3.3.0-rc1
  • qp-v3.3.1
  • qp-v3.3.2
  • qp-v3.4.0
  • qp-v3.4.0-rc1
  • qp-v3.4.1
  • qp-v3.4.2
  • qp-v3.5.0
  • qp-v3.5.0-beta1
  • qp-v3.5.0-rc1
  • qp-v3.5.1
  • qp-v3.6.0
  • qp-v3.6.0-beta1
  • qp-v3.6.0-rc1
  • tqtc/v2.6.0
  • tqtc/v2.6.0-rc
  • tqtc/v2.6.1
  • tqtc/v2.7.0
  • tqtc/v2.7.0-rc
  • tqtc/v2.7.2
  • tqtc/v2.8.0
  • tqtc/v2.8.0-beta
  • v1.0.0
  • v1.1.0
  • v1.1.0-rc1
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.90
  • v1.3.0
  • v1.3.0-beta
  • v1.3.0-rc1
  • v1.3.1
  • v2.0.0
  • v2.0.0-alpha
  • v2.0.0-beta
  • v2.0.0-rc1
  • v2.0.1
  • v2.1.0
  • v2.1.0-beta
  • v2.1.0-beta2
  • v2.1.0-rc1
  • v2.2.0
  • v2.2.0-beta
  • v2.2.0-rc1
  • v2.2.1
  • v2.3.0
  • v2.3.0-beta
  • v2.3.0-rc
  • v2.3.1
  • v2.4.0
  • v2.4.0-beta
  • v2.4.0-rc
  • v2.4.1
  • v2.5.0
  • v2.5.0-beta
  • v2.5.0-rc
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.0-beta
  • v2.6.0-rc
  • v2.6.1
158 results

Target

Select target project
  • tohunger/qt-creator
1 result
Select Git revision
  • 0.9.1-beta
  • 0.9.2-rc1
  • 1.0.0
  • 1.1
  • 1.2
  • 1.2.90
  • 1.3
  • 1.3.0
  • 1.3.0-beta
  • 1.3.1
  • 2.0
  • 2.0.0
  • 2.0.0-beta
  • 2.0.1
  • 2.1
  • 2.1.0
  • 2.2
  • 2.3
  • 2.4
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 4.0
  • 4.1
  • 4.2
  • 4.3
  • 4.4
  • 4.5
  • at-3.4
  • at-3.5
  • at-3.6
  • at-master
  • csa-3.3
  • csa-3.4
  • csa-3.5
  • csa-3.6
  • csa-master
  • master
  • qp-2.8
  • qp-3.0
  • qp-3.1
  • qp-3.2
  • qp-3.3
  • qp-3.4
  • qp-3.5
  • qp-3.6
  • qp-master
  • wip/boostbuildprojectmanager
  • wip/clang-query
  • wip/vcproj
  • at-v3.4.0
  • at-v3.4.0-beta1
  • at-v3.4.0-rc1
  • at-v3.4.1
  • at-v3.4.2
  • at-v3.5.0
  • at-v3.5.0-beta1
  • at-v3.5.0-rc1
  • at-v3.5.1
  • at-v3.6.0
  • at-v3.6.0-beta1
  • at-v3.6.0-rc1
  • csa-v3.3.0
  • csa-v3.3.0-beta1
  • csa-v3.3.0-rc1
  • csa-v3.3.1
  • csa-v3.3.2
  • csa-v3.4.0
  • csa-v3.4.0-beta1
  • csa-v3.4.0-rc1
  • csa-v3.4.1
  • csa-v3.4.2
  • csa-v3.5.0
  • csa-v3.5.0-beta1
  • csa-v3.5.0-rc1
  • csa-v3.5.1
  • csa-v3.6.0
  • csa-v3.6.0-beta1
  • csa-v3.6.0-rc1
  • qp-v3.1.0
  • qp-v3.1.0-beta1
  • qp-v3.2.0
  • qp-v3.2.0-beta1
  • qp-v3.2.1
  • qp-v3.2.2
  • qp-v3.3.0
  • qp-v3.3.0-beta1
  • qp-v3.3.0-rc1
  • qp-v3.3.1
  • qp-v3.3.2
  • qp-v3.4.0
  • qp-v3.4.0-rc1
  • qp-v3.4.1
  • qp-v3.4.2
  • qp-v3.5.0
  • qp-v3.5.0-beta1
  • qp-v3.5.0-rc1
  • qp-v3.5.1
  • qp-v3.6.0
  • qp-v3.6.0-beta1
  • qp-v3.6.0-rc1
  • tqtc/v2.6.0
  • tqtc/v2.6.0-rc
  • tqtc/v2.6.1
  • tqtc/v2.7.0
  • tqtc/v2.7.0-rc
  • tqtc/v2.7.2
  • tqtc/v2.8.0
  • tqtc/v2.8.0-beta
  • v1.0.0
  • v1.1.0
  • v1.1.0-rc1
  • v1.1.1
  • v1.2.0
  • v1.2.1
  • v1.2.90
  • v1.3.0
  • v1.3.0-beta
  • v1.3.0-rc1
  • v1.3.1
  • v2.0.0
  • v2.0.0-alpha
  • v2.0.0-beta
  • v2.0.0-rc1
  • v2.0.1
  • v2.1.0
  • v2.1.0-beta
  • v2.1.0-beta2
  • v2.1.0-rc1
  • v2.2.0
  • v2.2.0-beta
  • v2.2.0-rc1
  • v2.2.1
  • v2.3.0
  • v2.3.0-beta
  • v2.3.0-rc
  • v2.3.1
  • v2.4.0
  • v2.4.0-beta
  • v2.4.0-rc
  • v2.4.1
  • v2.5.0
  • v2.5.0-beta
  • v2.5.0-rc
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.0-beta
  • v2.6.0-rc
  • v2.6.1
158 results
Show changes
Showing
with 184 additions and 102 deletions
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h> #include <cppeditor/cppeditorconstants.h>
#include <QtCore/QtConcurrentRun> #include <QtCore/QtConcurrentRun>
...@@ -97,6 +98,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -97,6 +98,11 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
// Objects // Objects
m_modelManager = new CppModelManager(this); m_modelManager = new CppModelManager(this);
Core::VCSManager *vcsManager = core->vcsManager();
connect(vcsManager, SIGNAL(repositoryChanged(QString)),
m_modelManager, SLOT(updateModifiedSourceFiles()));
connect(vcsManager, SIGNAL(filesChanged(QStringList)),
m_modelManager, SLOT(updateModifiedSourceFiles()));
addAutoReleasedObject(m_modelManager); addAutoReleasedObject(m_modelManager);
m_completion = new CppCodeCompletion(m_modelManager); m_completion = new CppCodeCompletion(m_modelManager);
......
<plugin name="CVS" version="1.2.93" compatVersion="1.2.93"> <plugin name="CVS" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright> <copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license> <license>
...@@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> ...@@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>CVS integration.</description> <description>CVS integration.</description>
<url>http://qt.nokia.com</url> <url>http://qt.nokia.com</url>
<dependencyList> <dependencyList>
<dependency name="TextEditor" version="1.2.93"/> <dependency name="TextEditor" version="1.3.0"/>
<dependency name="ProjectExplorer" version="1.2.93"/> <dependency name="ProjectExplorer" version="1.3.0"/>
<dependency name="Core" version="1.2.93"/> <dependency name="Core" version="1.3.0"/>
<dependency name="VCSBase" version="1.2.93"/> <dependency name="VCSBase" version="1.3.0"/>
</dependencyList> </dependencyList>
</plugin> </plugin>
...@@ -96,3 +96,14 @@ QString CVSControl::findTopLevelForDirectory(const QString &directory) const ...@@ -96,3 +96,14 @@ QString CVSControl::findTopLevelForDirectory(const QString &directory) const
{ {
return m_plugin->findTopLevelForDirectory(directory); return m_plugin->findTopLevelForDirectory(directory);
} }
void CVSControl::emitRepositoryChanged(const QString &s)
{
emit repositoryChanged(s);
}
void CVSControl::emitFilesChanged(const QStringList &l)
{
emit filesChanged(l);
}
...@@ -56,6 +56,9 @@ public: ...@@ -56,6 +56,9 @@ public:
virtual bool vcsAdd(const QString &fileName); virtual bool vcsAdd(const QString &fileName);
virtual bool vcsDelete(const QString &filename); virtual bool vcsDelete(const QString &filename);
void emitRepositoryChanged(const QString &s);
void emitFilesChanged(const QStringList &l);
signals: signals:
void enabledChanged(bool); void enabledChanged(bool);
......
...@@ -48,9 +48,11 @@ namespace Internal { ...@@ -48,9 +48,11 @@ namespace Internal {
CVSEditor::CVSEditor(const VCSBase::VCSBaseEditorParameters *type, CVSEditor::CVSEditor(const VCSBase::VCSBaseEditorParameters *type,
QWidget *parent) : QWidget *parent) :
VCSBase::VCSBaseEditor(type, parent), VCSBase::VCSBaseEditor(type, parent),
m_revisionPattern(QLatin1String(CVS_REVISION_AT_START_PATTERN".*$")) m_revisionAnnotationPattern(QLatin1String(CVS_REVISION_AT_START_PATTERN".*$")),
m_revisionLogPattern(QLatin1String("^revision *("CVS_REVISION_PATTERN")$"))
{ {
QTC_ASSERT(m_revisionPattern.isValid(), return); QTC_ASSERT(m_revisionAnnotationPattern.isValid(), return);
QTC_ASSERT(m_revisionLogPattern.isValid(), return);
} }
QSet<QString> CVSEditor::annotationChanges() const QSet<QString> CVSEditor::annotationChanges() const
...@@ -79,16 +81,31 @@ QSet<QString> CVSEditor::annotationChanges() const ...@@ -79,16 +81,31 @@ QSet<QString> CVSEditor::annotationChanges() const
QString CVSEditor::changeUnderCursor(const QTextCursor &c) const QString CVSEditor::changeUnderCursor(const QTextCursor &c) const
{ {
// Try to match "1.1" strictly:
// Check for a revision number at the beginning of the line. // 1) Annotation: Check for a revision number at the beginning of the line.
// Note that "cursor.select(QTextCursor::WordUnderCursor)" will // Note that "cursor.select(QTextCursor::WordUnderCursor)" will
// only select the part up until the dot. // only select the part up until the dot.
// Check if we are at the beginning of a line within a reasonable offset. // Check if we are at the beginning of a line within a reasonable offset.
const QTextBlock block = c.block(); // 2) Log: check for lines like "revision 1.1", cursor past "revision"
if (c.atBlockStart() || (c.position() - block.position() < 3)) { switch (contentType()) {
const QString line = block.text(); case VCSBase::RegularCommandOutput:
if (m_revisionPattern.exactMatch(line)) case VCSBase::DiffOutput:
return m_revisionPattern.cap(1); break;
case VCSBase::AnnotateOutput: {
const QTextBlock block = c.block();
if (c.atBlockStart() || (c.position() - block.position() < 3)) {
const QString line = block.text();
if (m_revisionAnnotationPattern.exactMatch(line))
return m_revisionAnnotationPattern.cap(1);
}
}
break;
case VCSBase::LogOutput: {
const QTextBlock block = c.block();
if (c.position() - block.position() > 8 && m_revisionLogPattern.exactMatch(block.text()))
return m_revisionLogPattern.cap(1);
}
break;
} }
return QString(); return QString();
} }
......
...@@ -59,7 +59,8 @@ private: ...@@ -59,7 +59,8 @@ private:
virtual VCSBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const; virtual VCSBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const; virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
const QRegExp m_revisionPattern; const QRegExp m_revisionAnnotationPattern;
const QRegExp m_revisionLogPattern;
QString m_diffBaseDir; QString m_diffBaseDir;
}; };
......
...@@ -551,9 +551,11 @@ void CVSPlugin::revertCurrentFile() ...@@ -551,9 +551,11 @@ void CVSPlugin::revertCurrentFile()
QStringList args(QLatin1String("update")); QStringList args(QLatin1String("update"));
args.push_back(QLatin1String("-C")); args.push_back(QLatin1String("-C"));
const CVSResponse revertResponse = runCVS(args, QStringList(file), cvsShortTimeOut, true); const QStringList files = QStringList(file);
const CVSResponse revertResponse = runCVS(args, files, cvsShortTimeOut, true);
if (revertResponse.result == CVSResponse::Ok) { if (revertResponse.result == CVSResponse::Ok) {
fcb.setModifiedReload(true); fcb.setModifiedReload(true);
m_versionControl->emitFilesChanged(files);
} }
} }
...@@ -734,7 +736,10 @@ void CVSPlugin::updateProject() ...@@ -734,7 +736,10 @@ void CVSPlugin::updateProject()
if (!topLevels.empty()) { if (!topLevels.empty()) {
QStringList args(QLatin1String("update")); QStringList args(QLatin1String("update"));
args.push_back(QLatin1String("-dR")); args.push_back(QLatin1String("-dR"));
runCVS(args, topLevels, cvsLongTimeOut, true); const CVSResponse response = runCVS(args, topLevels, cvsLongTimeOut, true);
if (response.result == CVSResponse::Ok)
foreach(const QString &topLevel, topLevels)
m_versionControl->emitRepositoryChanged(topLevel);
} }
} }
......
...@@ -59,6 +59,7 @@ namespace CVS { ...@@ -59,6 +59,7 @@ namespace CVS {
namespace Internal { namespace Internal {
class CVSSubmitEditor; class CVSSubmitEditor;
class CVSControl;
struct CVSResponse struct CVSResponse
{ {
...@@ -153,7 +154,7 @@ private: ...@@ -153,7 +154,7 @@ private:
void cleanCommitMessageFile(); void cleanCommitMessageFile();
CVSSettings m_settings; CVSSettings m_settings;
Core::IVersionControl *m_versionControl; CVSControl *m_versionControl;
QString m_commitMessageFileName; QString m_commitMessageFileName;
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer; ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
......
<plugin name="Debugger" version="1.2.93" compatVersion="1.2.93"> <plugin name="Debugger" version="1.3.0" compatVersion="1.3.0">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright> <copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license> <license>
...@@ -19,10 +19,10 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license> ...@@ -19,10 +19,10 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Debugger integration.</description> <description>Debugger integration.</description>
<url>http://qt.nokia.com</url> <url>http://qt.nokia.com</url>
<dependencyList> <dependencyList>
<dependency name="CppEditor" version="1.2.93"/><!-- Debugger plugin adds items to the editor's context menu --> <dependency name="CppEditor" version="1.3.0"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="1.2.93"/> <dependency name="ProjectExplorer" version="1.3.0"/>
<dependency name="Core" version="1.2.93"/> <dependency name="Core" version="1.3.0"/>
<dependency name="Find" version="1.2.93"/> <dependency name="Find" version="1.3.0"/>
</dependencyList> </dependencyList>
<argumentList> <argumentList>
<argument name="-disable-cdb">Disable Cdb debugger engine</argument> <argument name="-disable-cdb">Disable Cdb debugger engine</argument>
......
...@@ -280,7 +280,7 @@ void BreakWindow::deleteBreakpoints(QList<int> list) ...@@ -280,7 +280,7 @@ void BreakWindow::deleteBreakpoints(QList<int> list)
const int firstRow = list.front(); const int firstRow = list.front();
qSort(list.begin(), list.end()); qSort(list.begin(), list.end());
for (int i = list.size(); --i >= 0; ) for (int i = list.size(); --i >= 0; )
emit breakpointDeleted(i); emit breakpointDeleted(list.at(i));
const int row = qMax(firstRow, model()->rowCount() - list.size() - 1); const int row = qMax(firstRow, model()->rowCount() - list.size() - 1);
if (row >= 0) if (row >= 0)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
win32 { win32 {
contains(QMAKE_CXX, cl) { contains(QMAKE_CXX, cl) {
CDB_PATH=$$(CDB_PATH) CDB_PATH="$$(CDB_PATH)"
isEmpty(CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows/sdk" isEmpty(CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows/sdk"
!exists($$CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows (x86)/sdk" !exists($$CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows (x86)/sdk"
......
...@@ -1034,9 +1034,16 @@ static inline QString msgStepFailed(unsigned long executionStatus, int threadId, ...@@ -1034,9 +1034,16 @@ static inline QString msgStepFailed(unsigned long executionStatus, int threadId,
return QString::fromLatin1("Thread %1: Unable to step into: %2").arg(threadId).arg(why); return QString::fromLatin1("Thread %1: Unable to step into: %2").arg(threadId).arg(why);
} }
// Step with DEBUG_STATUS_STEP_OVER ('p'-command) or // Step out has to be done via executing 'gu'. TODO: Remove once it is
// accessible via normal API for SetExecutionStatus().
enum { CdbExtendedExecutionStatusStepOut = 7452347 };
// Step with DEBUG_STATUS_STEP_OVER ('p'-command),
// DEBUG_STATUS_STEP_INTO ('t'-trace-command) or // DEBUG_STATUS_STEP_INTO ('t'-trace-command) or
// CdbExtendedExecutionStatusStepOut ("gu"-command)
// its reverse equivalents in the case of single threads. // its reverse equivalents in the case of single threads.
bool CdbDebugEngine::step(unsigned long executionStatus) bool CdbDebugEngine::step(unsigned long executionStatus)
{ {
if (debugCDBExecution) if (debugCDBExecution)
...@@ -1068,7 +1075,7 @@ bool CdbDebugEngine::step(unsigned long executionStatus) ...@@ -1068,7 +1075,7 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
m_d->setCodeLevel(); // Step by instruction or source line m_d->setCodeLevel(); // Step by instruction or source line
setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__); setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__);
bool success = false; bool success = false;
if (sameThread) { // Step event-triggering thread, use fast API if (sameThread && executionStatus != CdbExtendedExecutionStatusStepOut) { // Step event-triggering thread, use fast API
const HRESULT hr = m_d->m_cif.debugControl->SetExecutionStatus(executionStatus); const HRESULT hr = m_d->m_cif.debugControl->SetExecutionStatus(executionStatus);
success = SUCCEEDED(hr); success = SUCCEEDED(hr);
if (!success) if (!success)
...@@ -1077,8 +1084,18 @@ bool CdbDebugEngine::step(unsigned long executionStatus) ...@@ -1077,8 +1084,18 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
// Need to use a command to explicitly specify the current thread // Need to use a command to explicitly specify the current thread
QString command; QString command;
QTextStream str(&command); QTextStream str(&command);
str << '~' << m_d->m_currentThreadId << ' ' str << '~' << m_d->m_currentThreadId << ' ';
<< (executionStatus == DEBUG_STATUS_STEP_OVER ? 'p' : 't'); switch (executionStatus) {
case DEBUG_STATUS_STEP_OVER:
str << 'p';
break;
case DEBUG_STATUS_STEP_INTO:
str << 't';
break;
case CdbExtendedExecutionStatusStepOut:
str << "gu";
break;
}
manager()->showDebuggerOutput(tr("Stepping %1").arg(command)); manager()->showDebuggerOutput(tr("Stepping %1").arg(command));
const HRESULT hr = m_d->m_cif.debugControl->Execute(DEBUG_OUTCTL_THIS_CLIENT, command.toLatin1().constData(), DEBUG_EXECUTE_ECHO); const HRESULT hr = m_d->m_cif.debugControl->Execute(DEBUG_OUTCTL_THIS_CLIENT, command.toLatin1().constData(), DEBUG_EXECUTE_ECHO);
success = SUCCEEDED(hr); success = SUCCEEDED(hr);
...@@ -1121,44 +1138,8 @@ void CdbDebugEngine::nextIExec() ...@@ -1121,44 +1138,8 @@ void CdbDebugEngine::nextIExec()
void CdbDebugEngine::stepOutExec() void CdbDebugEngine::stepOutExec()
{ {
if (debugCDBExecution) if (!manager()->isReverseDebugging())
qDebug() << "stepOutExec"; step(CdbExtendedExecutionStatusStepOut);
// emulate gdb 'exec-finish' (exec until return of current function)
// by running up to address of the above stack frame (mostly works).
const StackHandler* sh = manager()->stackHandler();
const int idx = sh->currentIndex() + 1;
const QList<StackFrame> stackframes = sh->frames();
if (idx < 0 || idx >= stackframes.size()) {
warning(QString::fromLatin1("Cannot step out of stack frame %1.").arg(idx));
return;
}
// Set a temporary breakpoint and continue
const StackFrame& frame = stackframes.at(idx);
bool success = false;
QString errorMessage;
do {
const ULONG64 address = frame.address.toULongLong(&success, 16);
if (!success) {
errorMessage = QLatin1String("Cannot obtain address from stack frame");
break;
}
manager()->showDebuggerOutput(LogMisc, tr("Running to 0x%1...").arg(address, 0, 16));
IDebugBreakpoint2* pBP;
HRESULT hr = m_d->m_cif.debugControl->AddBreakpoint2(DEBUG_BREAKPOINT_CODE, DEBUG_ANY_ID, &pBP);
if (FAILED(hr) || !pBP) {
errorMessage = QString::fromLatin1("Cannot create temporary breakpoint: %1").arg(msgDebugEngineComResult(hr));
break;
}
pBP->SetOffset(address);
pBP->AddFlags(DEBUG_BREAKPOINT_ENABLED);
pBP->AddFlags(DEBUG_BREAKPOINT_ONE_SHOT);
if (!m_d->continueInferior(&errorMessage))
break;
success = true;
} while (false);
if (!success)
warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage));
} }
void CdbDebugEngine::continueInferior() void CdbDebugEngine::continueInferior()
......
...@@ -120,7 +120,6 @@ private: ...@@ -120,7 +120,6 @@ private:
void startWatchTimer(); void startWatchTimer();
void killWatchTimer(); void killWatchTimer();
void processTerminated(unsigned long exitCode); void processTerminated(unsigned long exitCode);
bool executeDebuggerCommand(const QString &command, QString *errorMessage);
bool evaluateExpression(const QString &expression, QString *value, QString *type, QString *errorMessage); bool evaluateExpression(const QString &expression, QString *value, QString *type, QString *errorMessage);
void evaluateWatcher(WatchData *wd); void evaluateWatcher(WatchData *wd);
QString editorToolTip(const QString &exp, const QString &function); QString editorToolTip(const QString &exp, const QString &function);
......
...@@ -401,18 +401,37 @@ QString CdbSymbolGroupContext::symbolINameAt(unsigned long index) const ...@@ -401,18 +401,37 @@ QString CdbSymbolGroupContext::symbolINameAt(unsigned long index) const
return m_inameIndexMap.key(index); return m_inameIndexMap.key(index);
} }
// check for "0x000", "0x000 class X" // Return hexadecimal pointer value from a CDB pointer value
// which look like "0x000032a" or "0x00000000`0250124a" or
// "0x1`0250124a" on 64-bit systems.
static bool inline getUnsignedHexValue(QString stringValue, quint64 *value)
{
*value = 0;
if (!stringValue.startsWith(QLatin1String("0x")))
return false;
stringValue.remove(0, 2);
// Remove 64bit separator
if (stringValue.size() > 9) {
const int sepPos = stringValue.size() - 9;
if (stringValue.at(sepPos) == QLatin1Char('`'))
stringValue.remove(sepPos, 1);
}
bool ok;
*value = stringValue.toULongLong(&ok, 16);
return ok;
}
// check for "0x000", "0x000 class X" or its 64-bit equivalents.
static inline bool isNullPointer(const WatchData &wd) static inline bool isNullPointer(const WatchData &wd)
{ {
if (!isPointerType(wd.type)) if (!isPointerType(wd.type))
return false; return false;
static const QRegExp hexNullPattern(QLatin1String("0x0+")); QString stringValue = wd.value;
Q_ASSERT(hexNullPattern.isValid()); const int blankPos = stringValue.indexOf(QLatin1Char(' '));
const int blankPos = wd.value.indexOf(QLatin1Char(' ')); if (blankPos != -1)
if (blankPos == -1) stringValue.truncate(blankPos);
return hexNullPattern.exactMatch(wd.value); quint64 value;
const QString addr = wd.value.mid(0, blankPos); return getUnsignedHexValue(stringValue, &value) && value == 0u;
return hexNullPattern.exactMatch(addr);
} }
// Fix a symbol group value. It is set to the class type for // Fix a symbol group value. It is set to the class type for
...@@ -430,11 +449,21 @@ static inline QString removeInnerTemplateType(QString value) ...@@ -430,11 +449,21 @@ static inline QString removeInnerTemplateType(QString value)
return value; return value;
} }
static inline QString fixValue(const QString &value) // Fix display values: Pass through strings, convert unsigned integers
// to decimal ('0x5454`fedf'), remove inner templates from
// "0x4343 class list<>".
static inline QString fixValue(const QString &value, const QString &type)
{ {
if (value.size() < 20 || value.endsWith(QLatin1Char('"'))) if (value.endsWith(QLatin1Char('"'))) // Pass through strings
return value; return value;
return removeInnerTemplateType(value); const int size = value.size();
// Unsigned hex numbers
if (isIntType(type) && (size > 2 && value.at(1) == QLatin1Char('x'))) {
quint64 intValue;
if (getUnsignedHexValue(value, &intValue))
return QString::number(intValue);
}
return size < 20 ? value : removeInnerTemplateType(value);
} }
WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const
...@@ -466,7 +495,7 @@ WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const ...@@ -466,7 +495,7 @@ WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const
return wd; return wd;
} }
const QString value = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolValueTextWide, index); const QString value = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
wd.setValue(fixValue(value)); wd.setValue(fixValue(value, type));
wd.setChildrenNeeded(); // compensate side effects of above setters wd.setChildrenNeeded(); // compensate side effects of above setters
// Figure out children. The SubElement is only a guess unless the symbol, // Figure out children. The SubElement is only a guess unless the symbol,
// is expanded, so, we leave this as a guess for later updates. // is expanded, so, we leave this as a guess for later updates.
...@@ -713,16 +742,11 @@ static inline bool getIntValue(CIDebugSymbolGroup *sg, int index, int *value) ...@@ -713,16 +742,11 @@ static inline bool getIntValue(CIDebugSymbolGroup *sg, int index, int *value)
} }
// Get pointer value of symbol group ("0xAAB") // Get pointer value of symbol group ("0xAAB")
static inline bool getPointerValue(CIDebugSymbolGroup *sg, int index, quint64 *value) // Note that this is on "00000000`0250124a" on 64bit systems.
static inline bool getUnsignedHexValue(CIDebugSymbolGroup *sg, int index, quint64 *value)
{ {
*value = 0; const QString stringValue = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
QString valueS = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index); return getUnsignedHexValue(stringValue, value);
if (!valueS.startsWith(QLatin1String("0x")))
return false;
valueS.remove(0, 2);
bool ok;
*value = valueS.toULongLong(&ok, 16);
return ok;
} }
int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd) int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
...@@ -746,7 +770,7 @@ int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd) ...@@ -746,7 +770,7 @@ int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
if (!getIntValue(m_symbolGroup, sizeIndex, &size)) if (!getIntValue(m_symbolGroup, sizeIndex, &size))
return 4; return 4;
quint64 array; quint64 array;
if (!getPointerValue(m_symbolGroup, arrayIndex, &array)) if (!getUnsignedHexValue(m_symbolGroup, arrayIndex, &array))
return 5; return 5;
// Fetch // Fetch
const bool truncated = size > maxLength; const bool truncated = size > maxLength;
......
...@@ -233,8 +233,8 @@ DebuggerSettings *DebuggerSettings::instance() ...@@ -233,8 +233,8 @@ DebuggerSettings *DebuggerSettings::instance()
item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel")); item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel"));
item->setText(tr("Use code model")); item->setText(tr("Use code model"));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(true);
item->setValue(false); item->setValue(true);
instance->insertItem(UseCodeModel, item); instance->insertItem(UseCodeModel, item);
item = new SavedAction(instance); item = new SavedAction(instance);
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <QtGui/QMessageBox>
#include <QtGui/QPlainTextEdit> #include <QtGui/QPlainTextEdit>
#include <QtGui/QTextCursor> #include <QtGui/QTextCursor>
#include <QtGui/QSyntaxHighlighter> #include <QtGui/QSyntaxHighlighter>
...@@ -68,13 +70,13 @@ namespace Internal { ...@@ -68,13 +70,13 @@ namespace Internal {
*/ */
MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr) MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr)
: QObject(manager), m_engine(manager->currentEngine()) : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager)
{ {
init(addr); init(addr);
} }
MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr) MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr)
: QObject(manager), m_engine(manager->currentEngine()) : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager)
{ {
bool ok = true; bool ok = true;
init(addr.toULongLong(&ok, 0)); init(addr.toULongLong(&ok, 0));
...@@ -94,11 +96,19 @@ void MemoryViewAgent::init(quint64 addr) ...@@ -94,11 +96,19 @@ void MemoryViewAgent::init(quint64 addr)
m_editor = editorManager->openEditorWithContents( m_editor = editorManager->openEditorWithContents(
Core::Constants::K_DEFAULT_BINARY_EDITOR, Core::Constants::K_DEFAULT_BINARY_EDITOR,
&titlePattern); &titlePattern);
connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)), if (m_editor) {
this, SLOT(fetchLazyData(quint64,bool))); connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)),
editorManager->activateEditor(m_editor); this, SLOT(fetchLazyData(quint64,bool)));
QMetaObject::invokeMethod(m_editor->widget(), "setLazyData", editorManager->activateEditor(m_editor);
Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize)); QMetaObject::invokeMethod(m_editor->widget(), "setLazyData",
Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize));
} else {
m_manager->showMessageBox(QMessageBox::Warning,
tr("No memory viewer available"),
tr("The memory contents cannot be shown as no viewer plugin not "
"the BinEditor plugin could be loaded."));
deleteLater();
}
} }
void MemoryViewAgent::fetchLazyData(quint64 block, bool sync) void MemoryViewAgent::fetchLazyData(quint64 block, bool sync)
...@@ -195,6 +205,8 @@ DisassemblerViewAgent::~DisassemblerViewAgent() ...@@ -195,6 +205,8 @@ DisassemblerViewAgent::~DisassemblerViewAgent()
if (d->editor) if (d->editor)
d->editor->deleteLater(); d->editor->deleteLater();
d->editor = 0; d->editor = 0;
delete d->locationMark;
d->locationMark = 0;
delete d; delete d;
d = 0; d = 0;
} }
......
...@@ -70,6 +70,7 @@ private: ...@@ -70,6 +70,7 @@ private:
QPointer<IDebuggerEngine> m_engine; QPointer<IDebuggerEngine> m_engine;
QPointer<Core::IEditor> m_editor; QPointer<Core::IEditor> m_editor;
QPointer<DebuggerManager> m_manager;
}; };
......
...@@ -57,6 +57,12 @@ const char * const DEBUGGER_SETTINGS_CATEGORY = QT_TRANSLATE_NOOP("Debugger", "D ...@@ -57,6 +57,12 @@ const char * const DEBUGGER_SETTINGS_CATEGORY = QT_TRANSLATE_NOOP("Debugger", "D
namespace Internal { namespace Internal {
enum { debug = 0 }; enum { debug = 0 };
#ifdef Q_OS_MAC
const char * const LD_PRELOAD_ENV_VAR = "DYLD_INSERT_LIBRARIES";
#else
const char * const LD_PRELOAD_ENV_VAR = "LD_PRELOAD";
#endif
} }
} // namespace Constants } // namespace Constants
...@@ -75,9 +81,11 @@ enum DebuggerState ...@@ -75,9 +81,11 @@ enum DebuggerState
InferiorStartFailed, InferiorStartFailed,
InferiorRunningRequested, // Debuggee requested to run InferiorRunningRequested, // Debuggee requested to run
InferiorRunningRequested_Kill, // Debuggee requested to run, but want to kill it
InferiorRunning, // Debuggee running InferiorRunning, // Debuggee running
InferiorStopping, // Debuggee running, stop requested InferiorStopping, // Debuggee running, stop requested
InferiorStopping_Kill, // Debuggee running, stop requested, want to kill it
InferiorStopped, // Debuggee stopped InferiorStopped, // Debuggee stopped
InferiorStopFailed, // Debuggee not stopped, will kill debugger InferiorStopFailed, // Debuggee not stopped, will kill debugger
......
...@@ -192,9 +192,11 @@ const char *DebuggerManager::stateName(int s) ...@@ -192,9 +192,11 @@ const char *DebuggerManager::stateName(int s)
SN(InferiorStarting) SN(InferiorStarting)
SN(InferiorStartFailed) SN(InferiorStartFailed)
SN(InferiorRunningRequested) SN(InferiorRunningRequested)
SN(InferiorRunningRequested_Kill)
SN(InferiorRunning) SN(InferiorRunning)
SN(InferiorUnrunnable) SN(InferiorUnrunnable)
SN(InferiorStopping) SN(InferiorStopping)
SN(InferiorStopping_Kill)
SN(InferiorStopped) SN(InferiorStopped)
SN(InferiorStopFailed) SN(InferiorStopFailed)
SN(InferiorShuttingDown) SN(InferiorShuttingDown)
...@@ -966,6 +968,8 @@ static IDebuggerEngine *determineDebuggerEngine(int /* pid */, ...@@ -966,6 +968,8 @@ static IDebuggerEngine *determineDebuggerEngine(int /* pid */,
void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp) void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
{ {
if (d->m_state != DebuggerNotReady)
return;
d->m_startParameters = sp; d->m_startParameters = sp;
d->m_inferiorPid = d->m_startParameters->attachPID > 0 d->m_inferiorPid = d->m_startParameters->attachPID > 0
? d->m_startParameters->attachPID : 0; ? d->m_startParameters->attachPID : 0;
...@@ -1576,11 +1580,17 @@ static bool isAllowedTransition(int from, int to) ...@@ -1576,11 +1580,17 @@ static bool isAllowedTransition(int from, int to)
return to == EngineShuttingDown; return to == EngineShuttingDown;
case InferiorRunningRequested: case InferiorRunningRequested:
return to == InferiorRunning || to == InferiorStopped
|| to == InferiorRunningRequested_Kill;
case InferiorRunningRequested_Kill:
return to == InferiorRunning || to == InferiorStopped; return to == InferiorRunning || to == InferiorStopped;
case InferiorRunning: case InferiorRunning:
return to == InferiorStopping; return to == InferiorStopping;
case InferiorStopping: case InferiorStopping:
return to == InferiorStopped || to == InferiorStopFailed
|| to == InferiorStopping_Kill;
case InferiorStopping_Kill:
return to == InferiorStopped || to == InferiorStopFailed; return to == InferiorStopped || to == InferiorStopFailed;
case InferiorStopped: case InferiorStopped:
return to == InferiorRunningRequested || to == InferiorShuttingDown; return to == InferiorRunningRequested || to == InferiorShuttingDown;
...@@ -1703,6 +1713,8 @@ bool DebuggerManager::debuggerActionsEnabled() const ...@@ -1703,6 +1713,8 @@ bool DebuggerManager::debuggerActionsEnabled() const
case AdapterStarted: case AdapterStarted:
case AdapterStartFailed: case AdapterStartFailed:
case InferiorStartFailed: case InferiorStartFailed:
case InferiorRunningRequested_Kill:
case InferiorStopping_Kill:
case InferiorStopFailed: case InferiorStopFailed:
case InferiorShuttingDown: case InferiorShuttingDown:
case InferiorShutDown: case InferiorShutDown:
......
...@@ -118,6 +118,7 @@ public: ...@@ -118,6 +118,7 @@ public:
QString symbolFileName; QString symbolFileName;
QString serverStartScript; QString serverStartScript;
int toolChainType; int toolChainType;
QString qtInstallPath;
QString dumperLibrary; QString dumperLibrary;
QStringList dumperLibraryLocations; QStringList dumperLibraryLocations;
......