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
725fb153
Commit
725fb153
authored
May 09, 2011
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: speed up python dumper
build up list of string chunks instead of big string
parent
da44415e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
share/qtcreator/gdbmacros/dumper.py
share/qtcreator/gdbmacros/dumper.py
+6
-5
No files found.
share/qtcreator/gdbmacros/dumper.py
View file @
725fb153
...
...
@@ -293,7 +293,7 @@ class OutputSafer:
def
__enter__
(
self
):
self
.
d
.
put
(
self
.
pre
)
self
.
savedOutput
=
self
.
d
.
output
self
.
d
.
output
=
""
self
.
d
.
output
=
[]
def
__exit__
(
self
,
exType
,
exValue
,
exTraceBack
):
self
.
d
.
put
(
self
.
post
)
...
...
@@ -301,7 +301,8 @@ class OutputSafer:
showException
(
"OUTPUTSAFER"
,
exType
,
exValue
,
exTraceBack
)
self
.
d
.
output
=
self
.
savedOutput
else
:
self
.
d
.
output
=
self
.
savedOutput
+
self
.
d
.
output
self
.
savedOutput
.
extend
(
self
.
d
.
output
)
self
.
d
.
output
=
self
.
savedOutput
return
False
...
...
@@ -1099,7 +1100,7 @@ class FrameCommand(gdb.Command):
FrameCommand
()
def
bb
(
args
):
output
=
'data=['
+
Dumper
(
args
).
output
+
'],typeinfo=['
output
=
'data=['
+
""
.
join
(
Dumper
(
args
).
output
)
+
'],typeinfo=['
for
typeName
,
typeInfo
in
typeInfoCache
.
iteritems
():
if
not
typeInfo
.
reported
:
output
+=
'{name="'
+
base64
.
b64encode
(
typeName
)
...
...
@@ -1149,7 +1150,7 @@ SalCommand()
class
Dumper
:
def
__init__
(
self
,
args
):
self
.
output
=
""
self
.
output
=
[]
self
.
printsAddress
=
True
self
.
currentChildType
=
""
self
.
currentChildNumChild
=
-
1
...
...
@@ -1410,7 +1411,7 @@ class Dumper:
def
put
(
self
,
value
):
self
.
output
+=
value
self
.
output
.
append
(
value
)
def
putField
(
self
,
name
,
value
):
self
.
put
(
'%s="%s",'
%
(
name
,
value
))
...
...
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