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
f2e77fb8
Commit
f2e77fb8
authored
15 years ago
by
Friedemann Kleint
Browse files
Options
Downloads
Patches
Plain Diff
Dumpers: Dump QFileInfo
parent
fade61a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/qtcreator/gdbmacros/test/main.cpp
+15
-1
15 additions, 1 deletion
share/qtcreator/gdbmacros/test/main.cpp
with
15 additions
and
1 deletion
share/qtcreator/gdbmacros/test/main.cpp
+
15
−
1
View file @
f2e77fb8
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#include
<QtCore/QMap>
#include
<QtCore/QMap>
#include
<QtCore/QSet>
#include
<QtCore/QSet>
#include
<QtCore/QVariant>
#include
<QtCore/QVariant>
#include
<QtCore/QFileInfo>
#include
<QtCore/QCoreApplication>
#include
<QtGui/QAction>
#include
<QtGui/QAction>
#include
<string>
#include
<string>
...
@@ -51,6 +53,7 @@ bool optTestUninitialized = false;
...
@@ -51,6 +53,7 @@ bool optTestUninitialized = false;
bool
optTestAll
=
false
;
bool
optTestAll
=
false
;
bool
optEmptyContainers
=
false
;
bool
optEmptyContainers
=
false
;
unsigned
optVerbose
=
0
;
unsigned
optVerbose
=
0
;
const
char
*
appPath
=
0
;
// Provide address of type of be tested.
// Provide address of type of be tested.
// When testing unitialized memory, allocate at random.
// When testing unitialized memory, allocate at random.
...
@@ -482,7 +485,6 @@ static int dumpStdMapStringString()
...
@@ -482,7 +485,6 @@ static int dumpStdMapStringString()
return
0
;
return
0
;
}
}
static
int
dumpQObject
()
static
int
dumpQObject
()
{
{
// Requires the childOffset to be know, but that is not critical
// Requires the childOffset to be know, but that is not critical
...
@@ -517,6 +519,16 @@ static int dumpQObject()
...
@@ -517,6 +519,16 @@ static int dumpQObject()
return
0
;
return
0
;
}
}
static
int
dumpQFileInfo
()
{
QFileInfo
test
(
QString
::
fromLatin1
(
appPath
));
prepareInBuffer
(
"QFileInfo"
,
"local.qfileinfo"
,
"local.qfileinfo"
,
""
);
qDumpObjectData440
(
2
,
42
,
testAddress
(
&
test
),
1
,
0
,
0
,
0
,
0
);
fputs
(
qDumpOutBuffer
,
stdout
);
fputc
(
'\n'
,
stdout
);
return
0
;
}
static
int
dumpQObjectList
()
static
int
dumpQObjectList
()
{
{
// Requires the childOffset to be know, but that is not critical
// Requires the childOffset to be know, but that is not critical
...
@@ -566,6 +578,7 @@ static TypeDumpFunctionMap registerTypes()
...
@@ -566,6 +578,7 @@ static TypeDumpFunctionMap registerTypes()
rc
.
insert
(
"set<QString>"
,
dumpStdQStringSet
);
rc
.
insert
(
"set<QString>"
,
dumpStdQStringSet
);
rc
.
insert
(
"map<int,string>"
,
dumpStdMapIntString
);
rc
.
insert
(
"map<int,string>"
,
dumpStdMapIntString
);
rc
.
insert
(
"map<string,string>"
,
dumpStdMapStringString
);
rc
.
insert
(
"map<string,string>"
,
dumpStdMapStringString
);
rc
.
insert
(
"QFileInfo"
,
dumpQFileInfo
);
rc
.
insert
(
"QObject"
,
dumpQObject
);
rc
.
insert
(
"QObject"
,
dumpQObject
);
rc
.
insert
(
"QObjectList"
,
dumpQObjectList
);
rc
.
insert
(
"QObjectList"
,
dumpQObjectList
);
rc
.
insert
(
"QVariant"
,
dumpQVariant
);
rc
.
insert
(
"QVariant"
,
dumpQVariant
);
...
@@ -592,6 +605,7 @@ static void usage(const char *b, const TypeDumpFunctionMap &tdm)
...
@@ -592,6 +605,7 @@ static void usage(const char *b, const TypeDumpFunctionMap &tdm)
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
appPath
=
argv
[
0
];
printf
(
"
\n
Qt Creator Debugging Helper testing tool
\n\n
"
);
printf
(
"
\n
Qt Creator Debugging Helper testing tool
\n\n
"
);
printf
(
"Running query protocol
\n
"
);
printf
(
"Running query protocol
\n
"
);
qDumpObjectData440
(
1
,
42
,
0
,
1
,
0
,
0
,
0
,
0
);
qDumpObjectData440
(
1
,
42
,
0
,
1
,
0
,
0
,
0
,
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
register
or
sign in
to comment