Commit 726b907c authored by hjk's avatar hjk

Debugger: Remove debuggerstringutils.h

With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 3333352e
......@@ -97,9 +97,9 @@ def qdump__Core__Id(d, value):
d.putPlainChildren(value)
def qdump__Debugger__Internal__GdbMi(d, value):
str = d.encodeByteArray(value["m_name"]) + "3a20" \
+ d.encodeByteArray(value["m_data"])
d.putValue(str, "latin1")
val = d.encodeString(value["m_name"]) + "3a002000" \
+ d.encodeString(value["m_data"])
d.putValue(val, "utf16")
d.putPlainChildren(value)
def qdump__Debugger__Internal__DisassemblerLine(d, value):
......@@ -107,11 +107,11 @@ def qdump__Debugger__Internal__DisassemblerLine(d, value):
d.putPlainChildren(value)
def qdump__Debugger__Internal__WatchData(d, value):
d.putByteArrayValue(value["iname"])
d.putStringValue(value["iname"])
d.putPlainChildren(value)
def qdump__Debugger__Internal__WatchItem(d, value):
d.putByteArrayValue(value["iname"])
d.putStringValue(value["iname"])
d.putPlainChildren(value)
def qdump__Debugger__Internal__BreakpointModelId(d, value):
......
......@@ -117,7 +117,7 @@ RunControl *BareMetalRunControlFactory::create(
foreach (const BareMetalGdbCommandsDeployStep *bs, bsl->allOfType<BareMetalGdbCommandsDeployStep>()) {
if (!sp.commandsAfterConnect.endsWith("\n"))
sp.commandsAfterConnect.append("\n");
sp.commandsAfterConnect.append(bs->gdbCommands().toLatin1());
sp.commandsAfterConnect.append(bs->gdbCommands());
}
}
}
......@@ -126,8 +126,8 @@ RunControl *BareMetalRunControlFactory::create(
sp.inferior.commandLineArguments = rc->arguments();
sp.symbolFile = bin;
sp.startMode = AttachToRemoteServer;
sp.commandsAfterConnect = p->initCommands().toLatin1();
sp.commandsForReset = p->resetCommands().toLatin1();
sp.commandsAfterConnect = p->initCommands();
sp.commandsForReset = p->resetCommands();
sp.remoteChannel = p->channel();
sp.useContinueInsteadOfRun = true;
......
......@@ -30,7 +30,6 @@
#include "debuggerengine.h"
#include "debuggericons.h"
#include "debuggerinternalconstants.h"
#include "debuggerstringutils.h"
#include "simplifytype.h"
#include <coreplugin/coreconstants.h>
......@@ -425,44 +424,43 @@ Breakpoint BreakHandler::findWatchpoint(const BreakpointParameters &params) cons
void BreakHandler::saveBreakpoints()
{
const QString one = _("1");
QList<QVariant> list;
foreach (TreeItem *n, rootItem()->children()) {
BreakpointItem *b = static_cast<BreakpointItem *>(n);
const BreakpointParameters &params = b->m_params;
QMap<QString, QVariant> map;
if (params.type != BreakpointByFileAndLine)
map.insert(_("type"), params.type);
map.insert("type", params.type);
if (!params.fileName.isEmpty())
map.insert(_("filename"), params.fileName);
map.insert("filename", params.fileName);
if (params.lineNumber)
map.insert(_("linenumber"), params.lineNumber);
map.insert("linenumber", params.lineNumber);
if (!params.functionName.isEmpty())
map.insert(_("funcname"), params.functionName);
map.insert("funcname", params.functionName);
if (params.address)
map.insert(_("address"), params.address);
map.insert("address", params.address);
if (!params.condition.isEmpty())
map.insert(_("condition"), params.condition);
map.insert("condition", params.condition);
if (params.ignoreCount)
map.insert(_("ignorecount"), params.ignoreCount);
map.insert("ignorecount", params.ignoreCount);
if (params.threadSpec >= 0)
map.insert(_("threadspec"), params.threadSpec);
map.insert("threadspec", params.threadSpec);
if (!params.enabled)
map.insert(_("disabled"), one);
map.insert("disabled", "1");
if (params.oneShot)
map.insert(_("oneshot"), one);
map.insert("oneshot", "1");
if (params.pathUsage != BreakpointPathUsageEngineDefault)
map.insert(_("usefullpath"), QString::number(params.pathUsage));
map.insert("usefullpath", QString::number(params.pathUsage));
if (params.tracepoint)
map.insert(_("tracepoint"), one);
map.insert("tracepoint", "1");
if (!params.module.isEmpty())
map.insert(_("module"), params.module);
map.insert("module", params.module);
if (!params.command.isEmpty())
map.insert(_("command"), params.command);
map.insert("command", params.command);
if (!params.expression.isEmpty())
map.insert(_("expression"), params.expression);
map.insert("expression", params.expression);
if (!params.message.isEmpty())
map.insert(_("message"), params.message);
map.insert("message", params.message);
list.append(map);
}
setSessionValue("Breakpoints", list);
......@@ -475,52 +473,52 @@ void BreakHandler::loadBreakpoints()
foreach (const QVariant &var, list) {
const QMap<QString, QVariant> map = var.toMap();
BreakpointParameters params(BreakpointByFileAndLine);
QVariant v = map.value(_("filename"));
QVariant v = map.value("filename");
if (v.isValid())
params.fileName = v.toString();
v = map.value(_("linenumber"));
v = map.value("linenumber");
if (v.isValid())
params.lineNumber = v.toString().toInt();
v = map.value(_("condition"));
v = map.value("condition");
if (v.isValid())
params.condition = v.toString().toLatin1();
v = map.value(_("address"));
params.condition = v.toString();
v = map.value("address");
if (v.isValid())
params.address = v.toString().toULongLong();
v = map.value(_("ignorecount"));
v = map.value("ignorecount");
if (v.isValid())
params.ignoreCount = v.toString().toInt();
v = map.value(_("threadspec"));
v = map.value("threadspec");
if (v.isValid())
params.threadSpec = v.toString().toInt();
v = map.value(_("funcname"));
v = map.value("funcname");
if (v.isValid())
params.functionName = v.toString();
v = map.value(_("disabled"));
v = map.value("disabled");
if (v.isValid())
params.enabled = !v.toInt();
v = map.value(_("oneshot"));
v = map.value("oneshot");
if (v.isValid())
params.oneShot = v.toInt();
v = map.value(_("usefullpath"));
v = map.value("usefullpath");
if (v.isValid())
params.pathUsage = static_cast<BreakpointPathUsage>(v.toInt());
v = map.value(_("tracepoint"));
v = map.value("tracepoint");
if (v.isValid())
params.tracepoint = bool(v.toInt());
v = map.value(_("type"));
v = map.value("type");
if (v.isValid() && v.toInt() != UnknownBreakpointType)
params.type = BreakpointType(v.toInt());
v = map.value(_("module"));
v = map.value("module");
if (v.isValid())
params.module = v.toString();
v = map.value(_("command"));
v = map.value("command");
if (v.isValid())
params.command = v.toString();
v = map.value(_("expression"));
v = map.value("expression");
if (v.isValid())
params.expression = v.toString();
v = map.value(_("message"));
v = map.value("message");
if (v.isValid())
params.message = v.toString();
if (params.isValid())
......@@ -732,7 +730,7 @@ PROPERTY(QString, fileName, setFileName)
PROPERTY(QString, functionName, setFunctionName)
PROPERTY(BreakpointType, type, setType)
PROPERTY(int, threadSpec, setThreadSpec)
PROPERTY(QByteArray, condition, setCondition)
PROPERTY(QString, condition, setCondition)
PROPERTY(QString, command, setCommand)
PROPERTY(quint64, address, setAddress)
PROPERTY(QString, expression, setExpression)
......@@ -753,16 +751,16 @@ const BreakpointParameters &Breakpoint::parameters() const
void Breakpoint::addToCommand(DebuggerCommand *cmd) const
{
cmd->arg("modelid", id().toByteArray());
cmd->arg("modelid", id().toString());
cmd->arg("id", int(response().id.majorPart()));
cmd->arg("type", type());
cmd->arg("ignorecount", ignoreCount());
cmd->arg("condition", condition().toHex());
cmd->arg("command", command().toUtf8().toHex());
cmd->arg("function", functionName().toUtf8());
cmd->arg("condition", toHex(condition()));
cmd->arg("command", toHex(command()));
cmd->arg("function", functionName());
cmd->arg("oneshot", isOneShot());
cmd->arg("enabled", isEnabled());
cmd->arg("file", fileName().toUtf8());
cmd->arg("file", fileName());
cmd->arg("line", lineNumber());
cmd->arg("address", address());
cmd->arg("expression", expression());
......
......@@ -93,8 +93,8 @@ public:
// obtained the BreakpointItem pointer.
BreakpointPathUsage pathUsage() const;
void setPathUsage(const BreakpointPathUsage &u);
QByteArray condition() const;
void setCondition(const QByteArray &condition);
QString condition() const;
void setCondition(const QString &condition);
int ignoreCount() const;
void setIgnoreCount(const int &count);
int threadSpec() const;
......
......@@ -46,24 +46,12 @@ QDebug operator<<(QDebug d, const BreakpointIdBase &id)
return d;
}
QByteArray BreakpointIdBase::toByteArray() const
{
if (!isValid())
return "<invalid bkpt>";
QByteArray ba = QByteArray::number(m_majorPart);
if (isMinor()) {
ba.append('.');
ba.append(QByteArray::number(m_minorPart));
}
return ba;
}
QString BreakpointIdBase::toString() const
{
if (!isValid())
return QLatin1String("<invalid bkpt>");
if (isMinor())
return QString::fromLatin1("%1.%2").arg(m_majorPart).arg(m_minorPart);
return QString("%1.%2").arg(m_majorPart).arg(m_minorPart);
return QString::number(m_majorPart);
}
......@@ -79,7 +67,7 @@ QString BreakpointIdBase::toString() const
*/
BreakpointModelId::BreakpointModelId(const QByteArray &ba)
BreakpointModelId::BreakpointModelId(const QString &ba)
{
int pos = ba.indexOf('\'');
if (pos == -1) {
......@@ -102,7 +90,7 @@ BreakpointModelId::BreakpointModelId(const QByteArray &ba)
are deleted, so, the ID is used.
*/
BreakpointResponseId::BreakpointResponseId(const QByteArray &ba)
BreakpointResponseId::BreakpointResponseId(const QString &ba)
{
int pos = ba.indexOf('.');
if (pos == -1) {
......@@ -203,23 +191,23 @@ bool BreakpointParameters::equals(const BreakpointParameters &rhs) const
return !differencesTo(rhs);
}
bool BreakpointParameters::conditionsMatch(const QByteArray &other) const
bool BreakpointParameters::conditionsMatch(const QString &other) const
{
// Some versions of gdb "beautify" the passed condition.
QByteArray s1 = condition;
QString s1 = condition;
s1.replace(' ', "");
QByteArray s2 = other;
QString s2 = other;
s2.replace(' ', "");
return s1 == s2;
}
void BreakpointParameters::updateLocation(const QByteArray &location)
void BreakpointParameters::updateLocation(const QString &location)
{
if (location.size()) {
int pos = location.indexOf(':');
lineNumber = location.mid(pos + 1).toInt();
QString file = QString::fromUtf8(location.left(pos));
if (file.startsWith(QLatin1Char('"')) && file.endsWith(QLatin1Char('"')))
QString file = location.left(pos);
if (file.startsWith('"') && file.endsWith('"'))
file = file.mid(1, file.size() - 2);
QFileInfo fi(file);
if (fi.isReadable())
......@@ -238,9 +226,9 @@ bool BreakpointParameters::isCppBreakpoint() const
if (type == BreakpointByFileAndLine) {
auto qmlExtensionString = QString::fromLocal8Bit(qgetenv("QTC_QMLDEBUGGER_FILEEXTENSIONS"));
if (qmlExtensionString.isEmpty())
qmlExtensionString = QLatin1Literal(".qml;.js");
qmlExtensionString = ".qml;.js";
auto qmlFileExtensions = qmlExtensionString.split(QLatin1Literal(";"), QString::SkipEmptyParts);
auto qmlFileExtensions = qmlExtensionString.split(";", QString::SkipEmptyParts);
foreach (QString extension, qmlFileExtensions) {
if (fileName.endsWith(extension, Qt::CaseInsensitive))
return false;
......
......@@ -48,7 +48,6 @@ public:
bool operator!() const { return !isValid(); }
operator const void*() const { return isValid() ? this : 0; }
quint32 toInternalId() const { return m_majorPart | (m_minorPart << 16); }
QByteArray toByteArray() const;
QString toString() const;
bool operator==(const BreakpointIdBase &id) const
{ return m_majorPart == id.m_majorPart && m_minorPart == id.m_minorPart; }
......@@ -66,7 +65,7 @@ public:
BreakpointModelId() { m_majorPart = m_minorPart = 0; }
explicit BreakpointModelId(quint16 ma) { m_majorPart = ma; m_minorPart = 0; }
BreakpointModelId(quint16 ma, quint16 mi) { m_majorPart = ma; m_minorPart = mi; }
explicit BreakpointModelId(const QByteArray &ba); // "21.2"
explicit BreakpointModelId(const QString &ba); // "21.2"
};
class BreakpointResponseId : public BreakpointIdBase
......@@ -75,7 +74,7 @@ public:
BreakpointResponseId() { m_majorPart = m_minorPart = 0; }
explicit BreakpointResponseId(quint16 ma) { m_majorPart = ma; m_minorPart = 0; }
BreakpointResponseId(quint16 ma, quint16 mi) { m_majorPart = ma; m_minorPart = mi; }
explicit BreakpointResponseId(const QByteArray &ba); // "21.2"
explicit BreakpointResponseId(const QString &ba); // "21.2"
};
......@@ -183,7 +182,7 @@ public:
BreakpointParts differencesTo(const BreakpointParameters &rhs) const;
bool isValid() const;
bool equals(const BreakpointParameters &rhs) const;
bool conditionsMatch(const QByteArray &other) const;
bool conditionsMatch(const QString &other) const;
bool isWatchpoint() const
{ return type == WatchpointAtAddress || type == WatchpointAtExpression; }
// Enough for now.
......@@ -191,7 +190,7 @@ public:
bool isTracepoint() const { return tracepoint; }
bool isCppBreakpoint() const;
QString toString() const;
void updateLocation(const QByteArray &location); // file.cpp:42
void updateLocation(const QString &location); // file.cpp:42
bool operator==(const BreakpointParameters &p) const { return equals(p); }
bool operator!=(const BreakpointParameters &p) const { return !equals(p); }
......@@ -200,7 +199,7 @@ public:
bool enabled; //!< Should we talk to the debugger engine?
BreakpointPathUsage pathUsage; //!< Should we use the full path when setting the bp?
QString fileName; //!< Short name of source file.
QByteArray condition; //!< Condition associated with breakpoint.
QString condition; //!< Condition associated with breakpoint.
int ignoreCount; //!< Ignore count associated with breakpoint.
int lineNumber; //!< Line in source file.
quint64 address; //!< Address for address based data breakpoints.
......
......@@ -460,7 +460,7 @@ void BreakpointDialog::getParts(unsigned partsMask, BreakpointParameters *data)
data->expression = m_lineEditExpression->text();
if (partsMask & ConditionPart)
data->condition = m_lineEditCondition->text().toUtf8();
data->condition = m_lineEditCondition->text();
if (partsMask & IgnoreCountPart)
data->ignoreCount = m_spinBoxIgnoreCount->text().toInt();
if (partsMask & ThreadSpecPart)
......@@ -510,7 +510,7 @@ void BreakpointDialog::setParts(unsigned mask, const BreakpointParameters &data)
}
if (mask & ConditionPart)
m_lineEditCondition->setText(QString::fromUtf8(data.condition));
m_lineEditCondition->setText(data.condition);
if (mask & IgnoreCountPart)
m_spinBoxIgnoreCount->setValue(data.ignoreCount);
if (mask & ThreadSpecPart)
......@@ -916,7 +916,7 @@ void BreakTreeView::editBreakpoints(const Breakpoints &bps)
return;
MultiBreakPointsDialog dialog;
dialog.setCondition(QString::fromLatin1(bp.condition()));
dialog.setCondition(bp.condition());
dialog.setIgnoreCount(bp.ignoreCount());
dialog.setThreadSpec(bp.threadSpec());
......@@ -929,7 +929,7 @@ void BreakTreeView::editBreakpoints(const Breakpoints &bps)
foreach (Breakpoint bp, bps) {
if (bp) {
bp.setCondition(newCondition.toLatin1());
bp.setCondition(newCondition);
bp.setIgnoreCount(newIgnoreCount);
bp.setThreadSpec(newThreadSpec);
}
......
HEADERS += $$PWD/cdbengine.h \
cdb/bytearrayinputstream.h \
cdb/cdbparsehelpers.h \
cdb/cdboptionspage.h
cdb/cdboptionspage.h \
cdb/stringinputstream.h
SOURCES += $$PWD/cdbengine.cpp \
cdb/bytearrayinputstream.cpp \
cdb/cdbparsehelpers.cpp \
cdb/cdboptionspage.cpp
cdb/cdboptionspage.cpp \
cdb/stringinputstream.cpp
FORMS += cdb/cdboptionspagewidget.ui
This diff is collapsed.
......@@ -45,7 +45,7 @@ namespace Internal {
class DisassemblerAgent;
class CdbCommand;
struct MemoryViewCookie;
class ByteArrayInputStream;
class StringInputStream;
class GdbMi;
class CdbEngine : public DebuggerEngine
......@@ -74,7 +74,7 @@ public:
void detachDebugger() override;
bool hasCapability(unsigned cap) const override;
void watchPoint(const QPoint &) override;
void setRegisterValue(const QByteArray &name, const QString &value) override;
void setRegisterValue(const QString &name, const QString &value) override;
void executeStep() override;
void executeStepOut() override;
......@@ -169,17 +169,17 @@ private:
bool conditionalBreakPointTriggered = false);
void processStop(const GdbMi &stopReason, bool conditionalBreakPointTriggered = false);
bool commandsPending() const;
void handleExtensionMessage(char t, int token, const QByteArray &what, const QByteArray &message);
void handleExtensionMessage(char t, int token, const QString &what, const QString &message);
bool doSetupEngine(QString *errorMessage);
bool launchCDB(const DebuggerRunParameters &sp, QString *errorMessage);
void handleSessionAccessible(unsigned long cdbExState);
void handleSessionInaccessible(unsigned long cdbExState);
void handleSessionIdle(const QByteArray &message);
void handleSessionIdle(const QString &message);
void doInterruptInferior(SpecialStopMode sm);
void doInterruptInferiorCustomSpecialStop(const QVariant &v);
void doContinueInferior();
inline void parseOutputLine(QByteArray line);
inline bool isCdbProcessRunning() const { return m_process.state() != QProcess::NotRunning; }
void parseOutputLine(QString line);
bool isCdbProcessRunning() const { return m_process.state() != QProcess::NotRunning; }
bool canInterruptInferior() const;
void syncOperateByInstruction(bool operateByInstruction);
void postWidgetAtCommand();
......@@ -219,7 +219,7 @@ private:
unsigned parseStackTrace(const GdbMi &data, bool sourceStepInto);
void mergeStartParametersSourcePathMap();
const QByteArray m_tokenPrefix;
const QString m_tokenPrefix;
QProcess m_process;
QScopedPointer<Utils::ConsoleProcess> m_consoleStub;
......@@ -231,10 +231,10 @@ private:
ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation;
int m_nextCommandToken;
QHash<int, DebuggerCommand> m_commandForToken;
QByteArray m_currentBuiltinResponse;
QString m_currentBuiltinResponse;
int m_currentBuiltinResponseToken;
QMap<QString, NormalizedSourceFileName> m_normalizedFileCache;
const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix
const QString m_extensionCommandPrefix; //!< Library name used as prefix
bool m_operateByInstructionPending; //!< Creator operate by instruction action changed.
bool m_operateByInstruction;
bool m_hasDebuggee;
......@@ -246,7 +246,7 @@ private:
} m_wow64State;
QTime m_logTime;
mutable int m_elapsedLogTime;
QByteArray m_extensionMessageBuffer;
QString m_extensionMessageBuffer;
bool m_sourceStepInto;
int m_watchPointX;
int m_watchPointY;
......
......@@ -25,7 +25,7 @@
#include "cdbparsehelpers.h"
#include "bytearrayinputstream.h"
#include "stringinputstream.h"
#include <debugger/debuggerprotocol.h>
#include <debugger/disassemblerlines.h>
......@@ -168,14 +168,14 @@ BreakpointResponseId cdbIdToBreakpointResponseId(const GdbMi &id)
return cdbIdToBreakpointId<BreakpointResponseId>(id);
}
QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
const QList<QPair<QString, QString> > &sourcePathMapping,
BreakpointModelId id /* = BreakpointId() */,
bool oneshot)
QString cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
const QList<QPair<QString, QString> > &sourcePathMapping,
BreakpointModelId id /* = BreakpointId() */,
bool oneshot)
{
const BreakpointParameters bp = fixWinMSVCBreakpoint(bpIn);
QByteArray rc;
ByteArrayInputStream str(rc);
QString rc;
StringInputStream str(rc);
if (bp.threadSpec >= 0)
str << '~' << bp.threadSpec << ' ';
......@@ -201,7 +201,7 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
case BreakpointAtJavaScriptThrow:
case UnknownBreakpointType:
case LastBreakpointType:
QTC_ASSERT(false, return QByteArray());
QTC_ASSERT(false, return QString());
break;
case BreakpointByAddress:
str << hex << hexPrefixOn << bp.address << hexPrefixOff << dec;
......@@ -231,14 +231,14 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
return rc;
}
QByteArray cdbClearBreakpointCommand(const BreakpointModelId &id)
QString cdbClearBreakpointCommand(const BreakpointModelId &id)
{
const int firstBreakPoint = breakPointIdToCdbId(id);
if (id.isMinor())
return "bc " + QByteArray::number(firstBreakPoint);
return "bc " + QString::number(firstBreakPoint);
// If this is a major break point we also want to delete all sub break points
const int lastBreakPoint = firstBreakPoint + cdbBreakPointIdMinorPart - 1;
return "bc " + QByteArray::number(firstBreakPoint) + '-' + QByteArray::number(lastBreakPoint);
return "bc " + QString::number(firstBreakPoint) + '-' + QString::number(lastBreakPoint);
}
// Helper to retrieve an int child from GDBMI
......@@ -280,10 +280,10 @@ void parseBreakPoint(const GdbMi &gdbmi, BreakpointResponse *r,
r->id = cdbIdToBreakpointResponseId(gdbmi["id"]);
const GdbMi moduleG = gdbmi["module"];
if (moduleG.isValid())
r->module = QString::fromLocal8Bit(moduleG.data());
r->module = moduleG.data();
const GdbMi sourceFileName = gdbmi["srcfile"];
if (sourceFileName.isValid()) {
r->fileName = QString::fromLocal8Bit(sourceFileName.data());
r->fileName = sourceFileName.data();
const GdbMi lineNumber = gdbmi["srcline"];
if (lineNumber.isValid())
r->lineNumber = lineNumber.data().toULongLong(0, 0);
......@@ -291,7 +291,7 @@ void parseBreakPoint(const GdbMi &gdbmi, BreakpointResponse *r,
if (expression) {
const GdbMi expressionG = gdbmi["expression"];
if (expressionG.isValid())
*expression = QString::fromLocal8Bit(expressionG.data());
*expression = expressionG.data();
}
const GdbMi addressG = gdbmi["address"];
if (addressG.isValid())
......@@ -301,10 +301,10 @@ void parseBreakPoint(const GdbMi &gdbmi, BreakpointResponse *r,
gdbmiChildToInt(gdbmi, "thread", &(r->threadSpec));
}
QByteArray cdbWriteMemoryCommand(quint64 addr, const QByteArray &data)
QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data)
{
QByteArray cmd;
ByteArrayInputStream str(cmd);
QString cmd;
StringInputStream str(cmd);
str.setIntegerBase(16);
str << "f " << addr << " L" << data.size();
const int count = data.size();
......@@ -384,10 +384,10 @@ QString WinException::toString(bool includeLocation) const
str << " (first chance)";
if (includeLocation) {
if (lineNumber) {
str << " at " << QLatin1String(file) << ':' << lineNumber;
str << " at " << file << ':' << lineNumber;
} else {
if (!function.isEmpty())
str << " in " << QLatin1String(function);