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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
832be2ec
Commit
832be2ec
authored
Oct 7, 2016
by
David Schulz
Browse files
Options
Downloads
Patches
Plain Diff
Dumper: Add MSVC standard string dumper
Change-Id: Iaea8123b3b8aeebd931c5f837ed10f0fba6b23f7 Reviewed-by:
hjk
<
hjk@qt.io
>
parent
4048403a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/qtcreator/debugger/stdtypes.py
+20
-0
20 additions, 0 deletions
share/qtcreator/debugger/stdtypes.py
with
20 additions
and
0 deletions
share/qtcreator/debugger/stdtypes.py
+
20
−
0
View file @
832be2ec
...
...
@@ -529,6 +529,9 @@ def qdumpHelper_std__string(d, value, charType, format):
if
d
.
isQnxTarget
():
qdumpHelper__std__string__QNX
(
d
,
value
,
charType
,
format
)
return
if
d
.
isMsvcTarget
():
qdumpHelper__std__string__MSVC
(
d
,
value
,
charType
,
format
)
return
data
=
value
.
extractPointer
()
# We can't lookup the std::string::_Rep type without crashing LLDB,
...
...
@@ -554,6 +557,23 @@ def qdumpHelper__std__string__QNX(d, value, charType, format):
d
.
check
(
0
<=
size
and
size
<=
alloc
and
alloc
<=
100
*
1000
*
1000
)
d
.
putCharArrayHelper
(
sizePtr
,
size
,
charType
,
format
)
def
qdumpHelper__std__string__MSVC
(
d
,
value
,
charType
,
format
):
val
=
value
try
:
size
=
value
[
'
_Mysize
'
].
integer
()
alloc
=
value
[
'
_Myres
'
].
integer
()
except
:
val
=
value
[
'
_Mypair
'
][
'
_Myval2
'
]
size
=
d
.
extractUInt64
(
val
[
'
_Mysize
'
])
alloc
=
d
.
extractUInt64
(
val
[
'
_Myres
'
])
_BUF_SIZE
=
int
(
16
/
charType
.
size
());
d
.
check
(
0
<=
size
and
size
<=
alloc
and
alloc
<=
100
*
1000
*
1000
)
if
_BUF_SIZE
<=
alloc
:
data
=
val
[
'
_Bx
'
][
'
_Ptr
'
].
pointer
()
else
:
data
=
val
[
'
_Bx
'
][
'
_Buf
'
].
address
()
d
.
putCharArrayHelper
(
data
,
size
,
charType
,
format
)
def
qdump__std____1__string
(
d
,
value
):
firstByte
=
value
.
split
(
'
b
'
)[
0
]
...
...
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
sign in
to comment