Skip to content
GitLab
Menu
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
d059459d
Commit
d059459d
authored
Jun 28, 2010
by
hjk
Browse files
debugger: make qulonglong visible in Local&Watchers
Only one level of typedef was stripped, but qulonglong has two.
parent
200b18d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
d059459d
...
...
@@ -755,6 +755,13 @@ def encodeString(value):
p
+=
1
return
s
def
stripTypedefs
(
typeobj
):
type
=
typeobj
while
type
.
code
==
gdb
.
TYPE_CODE_TYPEDEF
:
type
=
type
.
strip_typedefs
().
unqualified
()
return
type
#######################################################################
#
# Item
...
...
@@ -1236,6 +1243,7 @@ class Dumper:
#warn("REAL INAME: %s " % item.iname)
#warn("REAL NAME: %s " % name)
#warn("REAL TYPE: %s " % item.value.type)
#warn("REAL CODE: %s " % item.value.type.code)
#warn("REAL VALUE: %s " % item.value)
#try:
# warn("REAL VALUE: %s " % item.value)
...
...
@@ -1261,27 +1269,28 @@ class Dumper:
if
type
.
code
==
gdb
.
TYPE_CODE_TYPEDEF
:
type
=
type
.
target
()
strippedType
=
self
.
stripNamespaceFromType
(
type
.
strip_typedefs
().
unqualified
()).
replace
(
"::"
,
"__"
)
typedefStrippedType
=
stripTypedefs
(
type
)
nsStrippedType
=
self
.
stripNamespaceFromType
(
typedefStrippedType
)
\
.
replace
(
"::"
,
"__"
)
#warn(" STRIPPED: %s" %
s
trippedType)
#warn(" DUMPERS: %s" % (
s
trippedType in qqDumpers))
#warn(" STRIPPED: %s" %
nsS
trippedType)
#warn(" DUMPERS: %s" % (
nsS
trippedType in qqDumpers))
if
isSimpleType
(
type
.
unqualified
()
):
if
isSimpleType
(
type
defStrippedType
):
#warn("IS SIMPLE: %s " % type)
#self.putAddress(value.address)
self
.
putType
(
item
.
value
.
type
)
self
.
putValue
(
value
)
self
.
putNumChild
(
0
)
elif
((
format
is
None
)
or
(
format
>=
1
))
and
s
trippedType
in
qqDumpers
:
elif
((
format
is
None
)
or
(
format
>=
1
))
and
nsS
trippedType
in
qqDumpers
:
#warn("IS DUMPABLE: %s " % type)
#self.putAddress(value.address)
self
.
putType
(
item
.
value
.
type
)
qqDumpers
[
s
trippedType
](
self
,
item
)
qqDumpers
[
nsS
trippedType
](
self
,
item
)
#warn(" RESULT: %s " % self.output)
elif
type
.
code
==
gdb
.
TYPE_CODE_ENUM
:
elif
type
defStrippedType
.
code
==
gdb
.
TYPE_CODE_ENUM
:
#warn("GENERIC ENUM: %s" % value)
#self.putAddress(value.address)
self
.
putType
(
item
.
value
.
type
)
...
...
@@ -1289,7 +1298,7 @@ class Dumper:
self
.
putNumChild
(
0
)
elif
type
.
code
==
gdb
.
TYPE_CODE_PTR
:
elif
type
defStrippedType
.
code
==
gdb
.
TYPE_CODE_PTR
:
warn
(
"POINTER: %s"
%
format
)
isHandled
=
False
...
...
@@ -1316,9 +1325,9 @@ class Dumper:
self
.
putNumChild
(
0
)
if
(
not
isHandled
):
s
trippedType
=
str
(
type
.
strip_typedefs
()
)
\
anonS
trippedType
=
str
(
type
defStrippedType
)
\
.
replace
(
"(anonymous namespace)"
,
""
)
if
s
trippedType
.
find
(
"("
)
!=
-
1
:
if
anonS
trippedType
.
find
(
"("
)
!=
-
1
:
# A function pointer.
self
.
putValue
(
str
(
item
.
value
))
self
.
putAddress
(
value
.
address
)
...
...
@@ -1333,8 +1342,8 @@ class Dumper:
self
.
putNumChild
(
0
)
isHandled
=
True
target
=
str
(
type
.
target
().
strip_typedefs
().
unqualified
())
if
(
not
isHandled
)
and
target
==
"void"
:
target
=
str
ipTypedefs
(
type
.
target
())
if
(
not
isHandled
)
and
target
.
code
==
TYPE_CODE_VOID
:
self
.
putType
(
item
.
value
.
type
)
self
.
putValue
(
str
(
value
))
self
.
putNumChild
(
0
)
...
...
@@ -1424,7 +1433,7 @@ class Dumper:
def
putFields
(
self
,
item
,
innerType
=
None
):
value
=
item
.
value
fields
=
value
.
type
.
strip
_t
ypedefs
().
fields
()
fields
=
strip
T
ypedefs
(
value
.
type
).
fields
()
baseNumber
=
0
for
field
in
fields
:
#warn("FIELD: %s" % field)
...
...
tests/manual/gdbdebugger/simple/app.cpp
View file @
d059459d
...
...
@@ -1669,11 +1669,17 @@ FooVector fooVector()
return
f
;
}
namespace
ns
{
typedef
unsigned
long
long
vl
;
typedef
vl
verylong
;
};
void
testStuff
()
{
FooVector
const
&
f
=
fooVector
();
int
i
=
f
.
size
();
Q_UNUSED
(
i
);
ns
::
vl
j
=
1000
;
ns
::
verylong
k
=
1000
;
++
j
;
++
k
;
}
void
testPassByReferenceHelper
(
Foo
&
f
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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