Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
185aaa7e
Commit
185aaa7e
authored
May 16, 2011
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: use python's built-in min()
parent
dd3900a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
share/qtcreator/gdbmacros/dumper.py
share/qtcreator/gdbmacros/dumper.py
+1
-6
share/qtcreator/gdbmacros/gdbmacros.py
share/qtcreator/gdbmacros/gdbmacros.py
+2
-2
No files found.
share/qtcreator/gdbmacros/dumper.py
View file @
185aaa7e
...
...
@@ -83,11 +83,6 @@ def select(condition, if_expr, else_expr):
return
if_expr
return
else_expr
def
qmin
(
n
,
m
):
if
n
<
m
:
return
n
return
m
def
isGoodGdb
():
#return gdb.VERSION.startswith("6.8.50.2009") \
# and gdb.VERSION != "6.8.50.20090630-cvs"
...
...
@@ -1463,7 +1458,7 @@ class Dumper:
self
.
put
(
'%s="%s",'
%
(
name
,
value
))
def
childRange
(
self
):
return
xrange
(
q
min
(
self
.
currentMaxNumChilds
,
self
.
currentNumChilds
))
return
xrange
(
min
(
self
.
currentMaxNumChilds
,
self
.
currentNumChilds
))
# Convenience function.
def
putItemCount
(
self
,
count
,
maximum
=
1000000000
):
...
...
share/qtcreator/gdbmacros/gdbmacros.py
View file @
185aaa7e
...
...
@@ -454,7 +454,7 @@ def qdump__QList(d, item):
and
str
(
innerType
.
target
().
unqualified
())
!=
"char"
if
innerTypeIsPointer
:
p
=
gdb
.
Value
(
array
).
cast
(
innerType
.
pointer
())
+
begin
checkPointerRange
(
p
,
q
min
(
size
,
100
))
checkPointerRange
(
p
,
min
(
size
,
100
))
d
.
putItemCount
(
size
)
d
.
putNumChild
(
size
)
...
...
@@ -1878,7 +1878,7 @@ def qdump__std__string(d, item):
elif
str
(
charType
)
==
"wchar_t"
:
d
.
putType
(
"std::wstring"
,
1
)
n
=
q
min
(
size
,
1000
)
n
=
min
(
size
,
1000
)
if
charType
.
sizeof
==
1
:
format
=
"%02x"
for
i
in
xrange
(
size
):
...
...
Write
Preview
Markdown
is supported
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