Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Hunger
qt-creator
Commits
5eadf2be
Commit
5eadf2be
authored
Nov 05, 2009
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: simplify QList dumper
parent
085f6b2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
share/qtcreator/gdbmacros/gdbmacros.cpp
share/qtcreator/gdbmacros/gdbmacros.cpp
+9
-12
No files found.
share/qtcreator/gdbmacros/gdbmacros.cpp
View file @
5eadf2be
...
...
@@ -1613,31 +1613,28 @@ static void qDumpQList(QDumper &d)
// This uses the knowledge that QList<T> has only a single member
// of type union { QListData p; QListData::Data *d; };
const
QListData
&
ldata
=
*
reinterpret_cast
<
const
QListData
*>
(
d
.
data
);
const
QListData
::
Data
*
pdata
=
*
reinterpret_cast
<
const
QListData
::
Data
*
const
*>
(
d
.
data
);
const
int
nn
=
ldata
.
size
();
const
QListData
&
pdata
=
*
reinterpret_cast
<
const
QListData
*>
(
d
.
data
);
const
int
nn
=
pdata
.
size
();
if
(
nn
<
0
)
return
;
const
bool
innerTypeIsPointer
=
isPointerType
(
d
.
innerType
);
const
int
n
=
qMin
(
nn
,
1000
);
if
(
nn
>
0
)
{
if
(
l
data
.
d
->
begin
<
0
)
if
(
p
data
.
d
->
begin
<
0
)
return
;
if
(
ldata
.
d
->
begin
>
l
data
.
d
->
end
)
if
(
pdata
.
d
->
begin
>
p
data
.
d
->
end
)
return
;
#if QT_VERSION >= 0x040400
if
(
l
data
.
d
->
ref
.
_q_value
<=
0
)
if
(
p
data
.
d
->
ref
.
_q_value
<=
0
)
return
;
#endif
qCheckAccess
(
l
data
.
d
->
array
);
qCheckAccess
(
p
data
.
d
->
array
);
// Additional checks on pointer arrays
if
(
innerTypeIsPointer
)
for
(
int
i
=
0
;
i
!=
n
;
++
i
)
if
(
const
void
*
p
=
ldata
.
d
->
array
+
i
+
pdata
->
begin
)
if
(
const
void
*
p
=
pdata
.
d
->
array
+
i
+
pdata
.
d
->
begin
)
qCheckPointer
(
deref
(
p
));
}
qCheckAccess
(
pdata
);
d
.
putItemCount
(
"value"
,
nn
);
d
.
putItem
(
"valueeditable"
,
"false"
);
...
...
@@ -1658,7 +1655,7 @@ static void qDumpQList(QDumper &d)
for
(
int
i
=
0
;
i
!=
n
;
++
i
)
{
d
.
beginHash
();
if
(
innerTypeIsPointer
)
{
void
*
p
=
ldata
.
d
->
array
+
i
+
pdata
->
begin
;
void
*
p
=
pdata
.
d
->
array
+
i
+
pdata
.
d
->
begin
;
d
.
putItem
(
"saddr"
,
p
);
if
(
*
(
void
**
)
p
)
{
//d.putItem("value","@").put(p);
...
...
@@ -1668,7 +1665,7 @@ static void qDumpQList(QDumper &d)
d
.
putItem
(
"numchild"
,
"0"
);
}
}
else
{
void
*
p
=
ldata
.
d
->
array
+
i
+
pdata
->
begin
;
void
*
p
=
pdata
.
d
->
array
+
i
+
pdata
.
d
->
begin
;
if
(
isInternal
)
{
//qDumpInnerValue(d, d.innerType, p);
d
.
putItem
(
"addr"
,
p
);
...
...
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