Commit ad95e337 authored by hjk's avatar hjk
Browse files

debugger: fix recently introduced regression with compiled dumpers.

'+' instead of '+='. Duh.
parent 7544e753
...@@ -174,7 +174,8 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild ...@@ -174,7 +174,8 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild
QByteArray params; QByteArray params;
QList<QByteArray> extraArgs; QList<QByteArray> extraArgs;
const QtDumperHelper::TypeData td = m_dumperHelper.typeData(data0.type); const QtDumperHelper::TypeData td = m_dumperHelper.typeData(data0.type);
m_dumperHelper.evaluationParameters(data, td, QtDumperHelper::GdbDebugger, &params, &extraArgs); m_dumperHelper.evaluationParameters(data, td, QtDumperHelper::GdbDebugger,
&params, &extraArgs);
//int protocol = (data.iname.startsWith("watch") && data.type == "QImage") ? 3 : 2; //int protocol = (data.iname.startsWith("watch") && data.type == "QImage") ? 3 : 2;
//int protocol = data.iname.startsWith("watch") ? 3 : 2; //int protocol = data.iname.startsWith("watch") ? 3 : 2;
...@@ -198,7 +199,7 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild ...@@ -198,7 +199,7 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild
+ ',' + ','
+ (dumpChildren ? '1' : '0'); + (dumpChildren ? '1' : '0');
foreach (const QByteArray &ex, extraArgs) foreach (const QByteArray &ex, extraArgs)
cmd + ',' + ex; cmd += ',' + ex;
cmd += ')'; cmd += ')';
postCommand(cmd, WatchUpdate | NonCriticalResponse); postCommand(cmd, WatchUpdate | NonCriticalResponse);
......
...@@ -1156,10 +1156,8 @@ static inline bool isInteger(const QString &n) ...@@ -1156,10 +1156,8 @@ static inline bool isInteger(const QString &n)
} }
void QtDumperHelper::evaluationParameters(const WatchData &data, void QtDumperHelper::evaluationParameters(const WatchData &data,
const TypeData &td, const TypeData &td, Debugger debugger,
Debugger debugger, QByteArray *inBuffer, QByteArrayList *extraArgsIn) const
QByteArray *inBuffer,
QByteArrayList *extraArgsIn) const
{ {
enum { maxExtraArgCount = 4 }; enum { maxExtraArgCount = 4 };
...@@ -1189,10 +1187,9 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, ...@@ -1189,10 +1187,9 @@ void QtDumperHelper::evaluationParameters(const WatchData &data,
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
extraArgs.push_back(evaluationSizeofTypeExpression(inners.at(i), debugger)); extraArgs.push_back(evaluationSizeofTypeExpression(inners.at(i), debugger));
} }
int extraArgCount = extraArgs.size();
// Pad with zeros // Pad with zeros
const int extraPad = maxExtraArgCount - extraArgCount; while (extraArgs.size() < maxExtraArgCount)
for (int i = 0; i < extraPad; i++)
extraArgs.push_back("0"); extraArgs.push_back("0");
// in rare cases we need more or less: // in rare cases we need more or less:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment