Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
26339061
Commit
26339061
authored
Oct 26, 2010
by
hjk
Browse files
debugger: add python dumpers for __m128
parent
d599dc1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
26339061
...
...
@@ -1477,12 +1477,16 @@ class Dumper:
if
self
.
useFancy
\
and
((
format
is
None
)
or
(
format
>=
1
))
\
and
((
nsStrippedType
in
qqDumpers
)
or
isQObjectDerived
):
and
((
nsStrippedType
in
qqDumpers
)
\
or
(
str
(
type
)
in
qqDumpers
)
\
or
isQObjectDerived
):
#warn("IS DUMPABLE: %s " % type)
#self.putAddress(value.address)
self
.
putType
(
realtype
)
if
nsStrippedType
in
qqDumpers
:
qqDumpers
[
nsStrippedType
](
self
,
item
)
if
str
(
type
)
in
qqDumpers
:
qqDumpers
[
str
(
type
)](
self
,
item
)
elif
isQObjectDerived
:
# value has references stripped off item.value.
item1
=
Item
(
value
,
item
.
iname
)
...
...
share/qtcreator/gdbmacros/gdbmacros.py
View file @
26339061
...
...
@@ -2262,6 +2262,33 @@ def qdump__TLitC(d, item):
d
.
putValue
(
encodeSymbianString
(
base
,
size
),
Hex4EncodedLittleEndian
)
#######################################################################
#
# SSE
#
#######################################################################
def
qform____m128
():
return
"As Floats,As Doubles"
def
qdump____m128
(
d
,
item
):
d
.
putValue
(
" "
)
d
.
putNumChild
(
1
)
if
d
.
isExpanded
(
item
):
format
=
d
.
itemFormat
(
item
)
if
format
==
2
:
# As Double
innerType
=
lookupType
(
"double"
)
count
=
2
else
:
# Default, As float
innerType
=
lookupType
(
"float"
)
count
=
4
p
=
item
.
value
.
address
.
cast
(
innerType
.
pointer
())
with
Children
(
d
,
count
,
innerType
):
for
i
in
xrange
(
count
):
d
.
putItem
(
Item
(
p
.
dereference
(),
item
.
iname
))
p
+=
1
#######################################################################
#
# Display Test
...
...
tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
View file @
26339061
...
...
@@ -88,6 +88,11 @@
#undef max
#endif
#ifdef Q_OS_LINUX
#include
<xmmintrin.h>
#include
<stddef.h>
#endif
Q_DECLARE_METATYPE
(
QHostAddress
)
Q_DECLARE_METATYPE
(
QList
<
int
>
)
Q_DECLARE_METATYPE
(
QStringList
)
...
...
@@ -1368,12 +1373,34 @@ QStack<int> testQStack()
return
result
;
}
void
testQString
()
void
testQUrl
()
{
QUrl
url
(
QString
(
"http://www.nokia.com"
));
(
void
)
url
;
}
#ifdef FOP
int
xxxx
()
{
}
#else
int
xxxx
()
{
}
#endif
void
testQString
()
{
QImage
im
;
// Could be broken due to Return Value Optimzation
QString
str
=
"Hello "
;
str
+=
" big, "
;
str
+=
" fat "
;
...
...
@@ -2034,6 +2061,24 @@ void testWCout0()
cerr
<<
"EEEEEE"
<<
endl
;
}
void
testSSE
()
{
#ifdef Q_OS_LINUX
float
a
[
4
];
float
b
[
4
];
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a
[
i
]
=
2
*
i
;
b
[
i
]
=
2
*
i
;
}
__m128
sseA
,
sseB
;
sseA
=
_mm_loadu_ps
(
a
);
sseB
=
_mm_loadu_ps
(
b
);
++
i
;
#endif
}
void
testQSettings
()
{
// Note: Construct a QCoreApplication first.
...
...
@@ -2048,6 +2093,7 @@ int main(int argc, char *argv[])
//testQSettings();
//testWCout0();
//testWCout();
testSSE
();
testQLocale
();
testColor
();
testQRegion
();
...
...
@@ -2116,6 +2162,7 @@ int main(int argc, char *argv[])
testQMap
();
testQMultiMap
();
testQString
();
testQUrl
();
testQSet
();
# if QT_VERSION >= 0x040500
testQSharedPointer
();
...
...
tests/manual/gdbdebugger/simple/simple_gdbtest_app.pro
View file @
26339061
TEMPLATE
=
app
TARGET
=
simple_gdbtest_app
DEPENDPATH
+=
.
INCLUDEPATH
+=
.
DESTDIR
=
.
#
Input
SOURCES
+=
\
simple_gdbtest_app
.
cpp
SOURCES
+=
simple_gdbtest_app
.
cpp
#
SOURCES
+=
..
/../../
share
/
qtcreator
/
gdbmacros
/
gdbmacros
.
cpp
QT
+=
network
unix
:
QMAKE_CXXFLAGS
+=
-
msse2
message
(
"this says <foo & bar>"
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment