forked from qt-creator/qt-creator
Fix Qt Creator build with Clang
Change-Id: Id607170961db5b1919b316293a96ae3330216377 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -700,7 +700,8 @@ static std::string dumplocalHelper(ExtensionCommandContext &exc,PCSTR args, int
|
|||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
std::wstring value;
|
std::wstring value;
|
||||||
if (!dumpSimpleType(n->asSymbolGroupNode(), SymbolGroupValueContext(exc.dataSpaces(), exc.symbols()), &value, &std::string())) {
|
std::string tmp;
|
||||||
|
if (!dumpSimpleType(n->asSymbolGroupNode(), SymbolGroupValueContext(exc.dataSpaces(), exc.symbols()), &value, &tmp)) {
|
||||||
*errorMessage = "Cannot dump " + iname;
|
*errorMessage = "Cannot dump " + iname;
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
@@ -228,8 +228,9 @@ SymbolAncestorInfo SymbolGroupValue::infoOfAncestor(const std::string &name) con
|
|||||||
SymbolGroupValue SymbolGroupValue::addSymbol(const ULONG64 address, const std::string &type) const
|
SymbolGroupValue SymbolGroupValue::addSymbol(const ULONG64 address, const std::string &type) const
|
||||||
{
|
{
|
||||||
const std::string &pointerToType = pointedToSymbolName(address, type);
|
const std::string &pointerToType = pointedToSymbolName(address, type);
|
||||||
|
std::string tmp;
|
||||||
if (SymbolGroupNode *ancestorNode =
|
if (SymbolGroupNode *ancestorNode =
|
||||||
node()->symbolGroup()->addSymbol(module(), pointerToType, "", "", &std::string())) {
|
node()->symbolGroup()->addSymbol(module(), pointerToType, "", "", &tmp)) {
|
||||||
return SymbolGroupValue(ancestorNode, m_context);
|
return SymbolGroupValue(ancestorNode, m_context);
|
||||||
}
|
}
|
||||||
if (isValid() && SymbolGroupValue::verbose) { // Do not report subsequent errors
|
if (isValid() && SymbolGroupValue::verbose) { // Do not report subsequent errors
|
||||||
@@ -2064,8 +2065,9 @@ static inline bool dumpQRegion(const SymbolGroupValue &v, std::wostream &str, vo
|
|||||||
namestr << "(" << info.prependQtGuiModule("QRegionPrivate *") << ")("
|
namestr << "(" << info.prependQtGuiModule("QRegionPrivate *") << ")("
|
||||||
<< std::showbase << std::hex << d.pointerValue() << ')';
|
<< std::showbase << std::hex << d.pointerValue() << ')';
|
||||||
|
|
||||||
|
std::string tmp;
|
||||||
SymbolGroupNode *qRegionPrivateNode
|
SymbolGroupNode *qRegionPrivateNode
|
||||||
= v.node()->symbolGroup()->addSymbol(v.module(), namestr.str(), std::string(), &std::string());
|
= v.node()->symbolGroup()->addSymbol(v.module(), namestr.str(), std::string(), &tmp);
|
||||||
if (!qRegionPrivateNode)
|
if (!qRegionPrivateNode)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -2128,14 +2130,15 @@ static inline bool dumpQHostAddress(const SymbolGroupValue &v, std::wostream &st
|
|||||||
std::ostringstream namestr;
|
std::ostringstream namestr;
|
||||||
namestr << '(' << info.prependQtNetworkModule("QHostAddressPrivate *") << ")("
|
namestr << '(' << info.prependQtNetworkModule("QHostAddressPrivate *") << ")("
|
||||||
<< std::showbase << std::hex << d.pointerValue() << ')';
|
<< std::showbase << std::hex << d.pointerValue() << ')';
|
||||||
|
std::string tmp;
|
||||||
SymbolGroupNode *qHostAddressPrivateNode
|
SymbolGroupNode *qHostAddressPrivateNode
|
||||||
= v.node()->symbolGroup()->addSymbol(v.module(), namestr.str(), std::string(), &std::string());
|
= v.node()->symbolGroup()->addSymbol(v.module(), namestr.str(), std::string(), &tmp);
|
||||||
if (!qHostAddressPrivateNode)
|
if (!qHostAddressPrivateNode)
|
||||||
return false;
|
return false;
|
||||||
const SymbolGroupValue qHostAddressPrivateValue = SymbolGroupValue(qHostAddressPrivateNode, v.context());
|
const SymbolGroupValue qHostAddressPrivateValue = SymbolGroupValue(qHostAddressPrivateNode, v.context());
|
||||||
const bool parsed = readPODFromMemory<bool>(qHostAddressPrivateValue.context().dataspaces,
|
const bool parsed = readPODFromMemory<bool>(qHostAddressPrivateValue.context().dataspaces,
|
||||||
qHostAddressPrivateValue["isParsed"].address(),
|
qHostAddressPrivateValue["isParsed"].address(),
|
||||||
sizeof(bool), false, &std::string());
|
sizeof(bool), false, &tmp);
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
const int protocol = qHostAddressPrivateValue["protocol"].intValue(-1);
|
const int protocol = qHostAddressPrivateValue["protocol"].intValue(-1);
|
||||||
if (protocol < 0) {
|
if (protocol < 0) {
|
||||||
@@ -2888,7 +2891,8 @@ static bool dumpQVariant(const SymbolGroupValue &v, std::wostream &str, std::str
|
|||||||
if (const SymbolGroupValue mv = dataV.typeCast(vmType.c_str())) {
|
if (const SymbolGroupValue mv = dataV.typeCast(vmType.c_str())) {
|
||||||
SymbolGroupNode *mapNode = mv.node();
|
SymbolGroupNode *mapNode = mv.node();
|
||||||
std::wstring value;
|
std::wstring value;
|
||||||
if (dumpSimpleType(mapNode, dataV.context(), &value, &std::string())
|
std::string tmp;
|
||||||
|
if (dumpSimpleType(mapNode, dataV.context(), &value, &tmp)
|
||||||
== SymbolGroupNode::SimpleDumperOk) {
|
== SymbolGroupNode::SimpleDumperOk) {
|
||||||
str << value;
|
str << value;
|
||||||
if (specialInfoIn)
|
if (specialInfoIn)
|
||||||
@@ -2903,7 +2907,8 @@ static bool dumpQVariant(const SymbolGroupValue &v, std::wostream &str, std::str
|
|||||||
if (const SymbolGroupValue vl = dataV.typeCast(vLType.c_str())) {
|
if (const SymbolGroupValue vl = dataV.typeCast(vLType.c_str())) {
|
||||||
SymbolGroupNode *vListNode = vl.node();
|
SymbolGroupNode *vListNode = vl.node();
|
||||||
std::wstring value;
|
std::wstring value;
|
||||||
if (dumpSimpleType(vListNode, dataV.context(), &value, &std::string())
|
std::string tmp;
|
||||||
|
if (dumpSimpleType(vListNode, dataV.context(), &value, &tmp)
|
||||||
== SymbolGroupNode::SimpleDumperOk) {
|
== SymbolGroupNode::SimpleDumperOk) {
|
||||||
str << value;
|
str << value;
|
||||||
if (specialInfoIn)
|
if (specialInfoIn)
|
||||||
@@ -2929,7 +2934,8 @@ static bool dumpQVariant(const SymbolGroupValue &v, std::wostream &str, std::str
|
|||||||
if (const SymbolGroupValue sl = dataV.typeCast(qtInfo.prependQtCoreModule("QStringList *").c_str())) {
|
if (const SymbolGroupValue sl = dataV.typeCast(qtInfo.prependQtCoreModule("QStringList *").c_str())) {
|
||||||
SymbolGroupNode *listNode = sl.node();
|
SymbolGroupNode *listNode = sl.node();
|
||||||
std::wstring value;
|
std::wstring value;
|
||||||
if (dumpSimpleType(listNode, dataV.context(), &value, &std::string())
|
std::string tmp;
|
||||||
|
if (dumpSimpleType(listNode, dataV.context(), &value, &tmp)
|
||||||
== SymbolGroupNode::SimpleDumperOk) {
|
== SymbolGroupNode::SimpleDumperOk) {
|
||||||
str << value;
|
str << value;
|
||||||
if (specialInfoIn)
|
if (specialInfoIn)
|
||||||
|
@@ -193,7 +193,7 @@ bool isDebuggerWinException(unsigned long code)
|
|||||||
return code == EXCEPTION_BREAKPOINT || code == EXCEPTION_SINGLE_STEP;
|
return code == EXCEPTION_BREAKPOINT || code == EXCEPTION_SINGLE_STEP;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isFatalWinException(long code)
|
bool isFatalWinException(unsigned long code)
|
||||||
{
|
{
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case EXCEPTION_BREAKPOINT:
|
case EXCEPTION_BREAKPOINT:
|
||||||
@@ -217,7 +217,7 @@ bool winResumeThread(unsigned long, QString *) { return false; }
|
|||||||
bool isWinProcessBeingDebugged(unsigned long) { return false; }
|
bool isWinProcessBeingDebugged(unsigned long) { return false; }
|
||||||
void formatWindowsException(unsigned long , quint64, unsigned long,
|
void formatWindowsException(unsigned long , quint64, unsigned long,
|
||||||
quint64, quint64, QTextStream &) { }
|
quint64, quint64, QTextStream &) { }
|
||||||
bool isFatalWinException(long) { return false; }
|
bool isFatalWinException(unsigned long) { return false; }
|
||||||
bool isDebuggerWinException(unsigned long) { return false; }
|
bool isDebuggerWinException(unsigned long) { return false; }
|
||||||
|
|
||||||
#endif // !Q_OS_WIN
|
#endif // !Q_OS_WIN
|
||||||
|
@@ -40,7 +40,7 @@ bool winResumeThread(unsigned long dwThreadId, QString *errorMessage);
|
|||||||
bool isWinProcessBeingDebugged(unsigned long pid);
|
bool isWinProcessBeingDebugged(unsigned long pid);
|
||||||
|
|
||||||
// Special exception codes.
|
// Special exception codes.
|
||||||
enum
|
enum : unsigned long
|
||||||
{
|
{
|
||||||
winExceptionCppException = 0xe06d7363,
|
winExceptionCppException = 0xe06d7363,
|
||||||
winExceptionSetThreadName = 0x406d1388,
|
winExceptionSetThreadName = 0x406d1388,
|
||||||
@@ -60,7 +60,7 @@ void formatWindowsException(unsigned long code, quint64 address,
|
|||||||
unsigned long flags, quint64 info1, quint64 info2,
|
unsigned long flags, quint64 info1, quint64 info2,
|
||||||
QTextStream &str);
|
QTextStream &str);
|
||||||
// Check for access violation, etc.
|
// Check for access violation, etc.
|
||||||
bool isFatalWinException(long code);
|
bool isFatalWinException(unsigned long code);
|
||||||
|
|
||||||
// Check for EXCEPTION_BREAKPOINT, EXCEPTION_SINGLE_STEP
|
// Check for EXCEPTION_BREAKPOINT, EXCEPTION_SINGLE_STEP
|
||||||
bool isDebuggerWinException(unsigned long code);
|
bool isDebuggerWinException(unsigned long code);
|
||||||
|
Reference in New Issue
Block a user