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
Tobias Hunger
qt-creator
Commits
f01980e6
Commit
f01980e6
authored
Jul 01, 2010
by
hjk
Browse files
debugger: work around gdb bug
http://sourceware.org/bugzilla/show_bug.cgi?id=11777
parent
982ada02
Changes
1
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
f01980e6
...
...
@@ -1399,7 +1399,14 @@ class Dumper:
# Insufficient, see http://sourceware.org/bugzilla/show_bug.cgi?id=10953
#fields = value.type.fields()
fields
=
stripTypedefs
(
value
.
type
).
fields
()
# Insufficient, see http://sourceware.org/bugzilla/show_bug.cgi?id=11777
#fields = stripTypedefs(value.type).fields()
# This seems to work.
type
=
stripTypedefs
(
type
)
type
=
lookupType
(
str
(
type
))
fields
=
type
.
fields
()
self
.
putType
(
item
.
value
.
type
)
try
:
...
...
@@ -1436,7 +1443,10 @@ class Dumper:
def
putFields
(
self
,
item
,
innerType
=
None
):
value
=
item
.
value
fields
=
stripTypedefs
(
value
.
type
).
fields
()
type
=
stripTypedefs
(
value
.
type
)
# http://sourceware.org/bugzilla/show_bug.cgi?id=11777
type
=
lookupType
(
str
(
type
))
fields
=
stripTypedefs
(
type
).
fields
()
baseNumber
=
0
for
field
in
fields
:
#warn("FIELD: %s" % field)
...
...
@@ -1447,9 +1457,9 @@ class Dumper:
continue
# A static class member(?).
if
field
.
name
is
None
:
innerType
=
value
.
type
.
target
()
innerType
=
type
.
target
()
p
=
value
.
cast
(
innerType
.
pointer
())
for
i
in
xrange
(
value
.
type
.
sizeof
/
innerType
.
sizeof
):
for
i
in
xrange
(
type
.
sizeof
/
innerType
.
sizeof
):
self
.
putItem
(
Item
(
p
.
dereference
(),
item
.
iname
,
i
,
None
))
p
=
p
+
1
continue
...
...
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