forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.11'
Conflicts: src/plugins/perfprofiler/perfprofilerflamegraphmodel.cpp src/plugins/qtsupport/qtversionmanager.cpp Change-Id: I2f29dd2e86b028be46184b12ac2c17ace2513d5a
This commit is contained in:
@@ -917,15 +917,6 @@ void CdbEngine::handleJumpToLineAddressResolution(const DebuggerResponse &respon
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool isAsciiWord(const QString &s)
|
||||
{
|
||||
for (const QChar &c : s) {
|
||||
if (!c.isLetterOrNumber() || c.toLatin1() == 0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CdbEngine::assignValueInDebugger(WatchItem *w, const QString &expr, const QVariant &value)
|
||||
{
|
||||
if (debug)
|
||||
@@ -935,28 +926,8 @@ void CdbEngine::assignValueInDebugger(WatchItem *w, const QString &expr, const Q
|
||||
qWarning("Internal error: assignValueInDebugger: Invalid state or no stack frame.");
|
||||
return;
|
||||
}
|
||||
QString cmd;
|
||||
StringInputStream str(cmd);
|
||||
switch (value.type()) {
|
||||
case QVariant::String: {
|
||||
// Convert qstring to Utf16 data not considering endianness for Windows.
|
||||
const QString s = value.toString();
|
||||
if (isAsciiWord(s)) {
|
||||
str << m_extensionCommandPrefix << "assign \"" << w->iname << '=' << s << '"';
|
||||
} else {
|
||||
const QByteArray utf16(reinterpret_cast<const char *>(s.utf16()), 2 * s.size());
|
||||
str << m_extensionCommandPrefix << "assign -u " << w->iname << '='
|
||||
<< QString::fromLatin1(utf16.toHex());
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
str << m_extensionCommandPrefix << "assign " << w->iname << '='
|
||||
<< value.toString();
|
||||
break;
|
||||
}
|
||||
|
||||
runCommand({cmd, NoFlags});
|
||||
runCommand({m_extensionCommandPrefix + "assign -h " + w->iname + '=' + toHex(value.toString()),
|
||||
NoFlags});
|
||||
// Update all locals in case we change a union or something pointed to
|
||||
// that affects other variables, too.
|
||||
updateLocals();
|
||||
|
||||
@@ -442,6 +442,7 @@ public:
|
||||
m_lookupRequests.clear();
|
||||
m_locationTimer.stop();
|
||||
m_locationMark.reset();
|
||||
m_stackHandler.resetLocation();
|
||||
m_disassemblerAgent.resetLocation();
|
||||
m_toolTipManager.resetLocation();
|
||||
}
|
||||
|
||||
@@ -870,6 +870,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
||||
engineManagerView->setSettings(ICore::settings(), "Debugger.SnapshotView");
|
||||
engineManagerView->setIconSize(QSize(10, 10));
|
||||
engineManagerView->setModel(m_engineManager.model());
|
||||
engineManagerView->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
auto engineManagerWindow = addSearch(engineManagerView);
|
||||
engineManagerWindow->setWindowTitle(tr("Debugger Perspectives"));
|
||||
|
||||
@@ -314,6 +314,11 @@ void StackHandler::scheduleResetLocation()
|
||||
m_contentsValid = false;
|
||||
}
|
||||
|
||||
void StackHandler::resetLocation()
|
||||
{
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
int StackHandler::stackRowCount() const
|
||||
{
|
||||
// Only one "thread" for now.
|
||||
|
||||
@@ -112,6 +112,7 @@ public:
|
||||
bool isContentsValid() const { return m_contentsValid; }
|
||||
bool operatesByInstruction() const;
|
||||
void scheduleResetLocation();
|
||||
void resetLocation();
|
||||
|
||||
QIcon iconForRow(int row) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user