Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
fbdfb3ac
Commit
fbdfb3ac
authored
Mar 01, 2011
by
hjk
Browse files
debugger: display size of bitfields in 'type' column
parent
8bcaf428
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/watchdata.cpp
View file @
fbdfb3ac
...
...
@@ -144,6 +144,8 @@ WatchData::WatchData() :
state
(
InitialState
),
editformat
(
0
),
address
(
0
),
bitpos
(
0
),
bitsize
(
0
),
generation
(
-
1
),
hasChildren
(
false
),
valueEnabled
(
true
),
...
...
src/plugins/debugger/watchdata.h
View file @
fbdfb3ac
...
...
@@ -128,6 +128,8 @@ public:
QByteArray
type
;
// Type for further processing
QString
displayedType
;
// Displayed type (optional)
quint64
address
;
// Displayed address
uint
bitpos
;
// Position within bit fields
uint
bitsize
;
// Size in case of bit fields
qint32
generation
;
// When updated?
bool
hasChildren
;
bool
valueEnabled
;
// Value will be enabled or not
...
...
src/plugins/debugger/watchhandler.cpp
View file @
fbdfb3ac
...
...
@@ -285,9 +285,12 @@ static QString removeInitialNamespace(QString str, const QByteArray &ns)
QString
WatchModel
::
displayType
(
const
WatchData
&
data
)
const
{
return
data
.
displayedType
.
isEmpty
()
QString
base
=
data
.
displayedType
.
isEmpty
()
?
niceTypeHelper
(
data
.
type
)
:
data
.
displayedType
;
if
(
data
.
bitsize
)
base
+=
QString
(
":%1"
).
arg
(
data
.
bitsize
);
return
base
;
}
static
int
formatToIntegerBase
(
int
format
)
...
...
src/plugins/debugger/watchutils.cpp
View file @
fbdfb3ac
...
...
@@ -1399,6 +1399,12 @@ void parseWatchData(const QSet<QByteArray> &expandedINames,
mi
=
item
.
findChild
(
"typeformats"
);
if
(
mi
.
isValid
())
data
.
typeFormats
=
QString
::
fromUtf8
(
mi
.
data
());
mi
=
item
.
findChild
(
"bitpos"
);
if
(
mi
.
isValid
())
data
.
bitpos
=
mi
.
data
().
toInt
();
mi
=
item
.
findChild
(
"bitsize"
);
if
(
mi
.
isValid
())
data
.
bitsize
=
mi
.
data
().
toInt
();
setWatchDataValue
(
data
,
item
);
setWatchDataAddress
(
data
,
item
.
findChild
(
"addr"
));
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment