Commit 0b57c8de authored by hjk's avatar hjk

Debugger: Fix LLDB display of std::array with "complex" content

Change-Id: I43dd9b8afe76f204fe2509f1f2f81f74c48a16ab
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 7017e955
......@@ -737,7 +737,7 @@ class Dumper:
def putArrayData(self, type, base, n,
childNumChild = None, maxNumChild = 10000):
if not self.tryPutArrayContents(type, base, n):
base = base.cast(type.pointer())
base = self.createPointerValue(base, type)
with Children(self, n, type, childNumChild, maxNumChild,
base, type.GetByteSize()):
for i in self.childRange():
......
......@@ -2148,7 +2148,11 @@ def qdump__std__array(d, value):
d.putNumChild(size)
if d.isExpanded():
innerType = d.templateArgument(value.type, 0)
d.putArrayData(innerType, value.address, size)
d.putArrayData(innerType, d.addressOf(value), size)
def qdump__std____1__array(d, value):
qdump__std__array(d, value)
def qdump__std__complex(d, value):
......
......@@ -330,8 +330,30 @@ struct Profile
struct Cxx11Profile : public Profile
{
//Cxx11Profile() : Profile("CONFIG += c++11") {}
Cxx11Profile() : Profile("QMAKE_CXXFLAGS += -std=c++0x") {}
Cxx11Profile()
: Profile("greaterThan(QT_MAJOR_VERSION,4): CONFIG += c++11\n"
"else: QMAKE_CXXFLAGS += -std=c++0x\n")
{}
};
struct MacLibStdCppProfile : public Profile
{
MacLibStdCppProfile()
: Profile("macx {\n"
"QMAKE_CXXFLAGS += -stdlib=libc++\n"
"LIBS += -stdlib=libc++\n"
"QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7\n"
"QMAKE_IOS_DEPLOYMENT_TARGET = 10.7\n"
"QMAKE_CFLAGS -= -mmacosx-version-min=10.6\n"
"QMAKE_CFLAGS += -mmacosx-version-min=10.7\n"
"QMAKE_CXXFLAGS -= -mmacosx-version-min=10.6\n"
"QMAKE_CXXFLAGS += -mmacosx-version-min=10.7\n"
"QMAKE_OBJECTIVE_CFLAGS -= -mmacosx-version-min=10.6\n"
"QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.7\n"
"QMAKE_LFLAGS -= -mmacosx-version-min=10.6\n"
"QMAKE_LFLAGS += -mmacosx-version-min=10.7\n"
"}")
{}
};
struct GdbOnly {};
......@@ -959,6 +981,7 @@ void tst_Dumpers::dumper()
qDebug() << "CONTENTS : " << contents;
qDebug() << "Qt VERSION : "
<< qPrintable(QString::number(context.qtVersion, 16));
qDebug() << "BUILD DIR : " << qPrintable(t->buildPath);
}
QVERIFY(ok);
t->buildTemp.setAutoRemove(m_keepTemp);
......@@ -2317,6 +2340,7 @@ void tst_Dumpers::dumper_data()
"unused(&a, &b);\n")
% CoreProfile()
% Cxx11Profile()
% MacLibStdCppProfile()
% Check("a", "<4 items>", "std::array<int, 4u>")
% Check("b", "<4 items>", "std::array<@QString, 4u>");
......
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