Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
5f5dbc62
Commit
5f5dbc62
authored
14 years ago
by
hjk
Browse files
Options
Downloads
Patches
Plain Diff
debugger: remove unneeded argument from templateArgument()
parent
1fdfe414
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
share/qtcreator/gdbmacros/dumper.py
+2
-2
2 additions, 2 deletions
share/qtcreator/gdbmacros/dumper.py
share/qtcreator/gdbmacros/gdbmacros.py
+6
-9
6 additions, 9 deletions
share/qtcreator/gdbmacros/gdbmacros.py
with
8 additions
and
11 deletions
share/qtcreator/gdbmacros/dumper.py
+
2
−
2
View file @
5f5dbc62
...
...
@@ -162,7 +162,7 @@ def cleanAddress(addr):
# that might trigger Unicode encoding errors.
return
addr
.
cast
(
lookupType
(
"
void
"
).
pointer
())
def
templateArgument
(
type
,
position
,
outerLen
):
def
templateArgument
(
type
,
position
)
try
:
# This fails on stock 7.2 with
# "RuntimeError: No type named myns::QObject.\n"
...
...
@@ -170,7 +170,7 @@ def templateArgument(type, position, outerLen):
except
:
# That's something like "myns::QList<...>"
innerString
=
str
(
type
.
strip_typedefs
())
return
lookupType
(
innerString
[
outerLen
+
1
:
-
1
])
return
lookupType
(
innerString
[
innerString
.
find
(
'
<
'
)
+
1
:
-
1
])
# Workaround for gdb < 7.1
def
numericTemplateArgument
(
type
,
position
):
...
...
This diff is collapsed.
Click to expand it.
share/qtcreator/gdbmacros/gdbmacros.py
+
6
−
9
View file @
5f5dbc62
...
...
@@ -318,8 +318,7 @@ def qdump__QFixed(d, item):
def
qdump__QFlags
(
d
,
item
):
i
=
item
.
value
[
"
i
"
]
try
:
enumType
=
templateArgument
(
item
.
value
.
type
.
unqualified
(),
0
,
len
(
d
.
ns
)
+
len
(
'
QFlags
'
))
enumType
=
templateArgument
(
item
.
value
.
type
.
unqualified
(),
0
)
d
.
putValue
(
"
%s (%s)
"
%
(
i
.
cast
(
enumType
),
i
))
except
:
d
.
putValue
(
"
%s
"
%
i
)
...
...
@@ -437,7 +436,7 @@ def qdump__QList(d, item):
checkRef
(
d_ptr
[
"
ref
"
])
# Additional checks on pointer arrays.
innerType
=
templateArgument
(
item
.
value
.
type
,
0
,
len
(
d
.
ns
)
+
len
(
'
QList
'
)
)
innerType
=
templateArgument
(
item
.
value
.
type
,
0
)
innerTypeIsPointer
=
innerType
.
code
==
gdb
.
TYPE_CODE_PTR
\
and
str
(
innerType
.
target
().
unqualified
())
!=
"
char
"
if
innerTypeIsPointer
:
...
...
@@ -536,8 +535,7 @@ def qdump__QLinkedList(d, item):
d
.
putItemCount
(
n
)
d
.
putNumChild
(
n
)
if
d
.
isExpanded
(
item
):
innerType
=
templateArgument
(
item
.
value
.
type
,
0
,
len
(
d
.
ns
)
+
len
(
'
QLinkedList
'
))
innerType
=
templateArgument
(
item
.
value
.
type
,
0
)
with
Children
(
d
,
[
n
,
1000
],
innerType
):
p
=
e_ptr
[
"
n
"
]
for
i
in
d
.
childRange
():
...
...
@@ -1588,8 +1586,7 @@ def qdump__QSharedDataPointer(d, item):
# This replaces the pointer by the pointee, making the
# pointer transparent.
try
:
innerType
=
templateArgument
(
item
.
value
.
type
,
0
,
len
(
d
.
ns
)
+
len
(
'
QSharedDataPointer
'
))
innerType
=
templateArgument
(
item
.
value
.
type
,
0
)
except
:
d
.
putValue
(
d_ptr
)
d
.
putPlainChildren
(
item
)
...
...
@@ -1917,7 +1914,7 @@ def qdump__QVector(d, item):
check
(
0
<=
size
and
size
<=
alloc
and
alloc
<=
1000
*
1000
*
1000
)
checkRef
(
d_ptr
[
"
ref
"
])
innerType
=
templateArgument
(
item
.
value
.
type
,
0
,
len
(
d
.
ns
)
+
len
(
'
QVector
'
)
)
innerType
=
templateArgument
(
item
.
value
.
type
,
0
)
d
.
putItemCount
(
size
)
d
.
putNumChild
(
size
)
if
d
.
isExpanded
(
item
):
...
...
@@ -1949,7 +1946,7 @@ def qdump__QWeakPointer(d, item):
check
(
int
(
strongref
)
<=
int
(
weakref
))
check
(
int
(
weakref
)
<=
10
*
1000
*
1000
)
innerType
=
templateArgument
(
item
.
value
.
type
,
0
,
len
(
d
.
ns
)
+
len
(
'
QWeakPointer
'
)
)
innerType
=
templateArgument
(
item
.
value
.
type
,
0
)
if
isSimpleType
(
value
.
dereference
().
type
):
d
.
putItem
(
Item
(
value
.
dereference
(),
item
.
iname
,
None
))
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment