Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
5c9e99e5
Commit
5c9e99e5
authored
2 years ago
by
Loïc Correnson
Committed by
David Bühler
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] inspector all types sizeof in bytes
parent
f87b3ff1
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
src/plugins/server/kernel_ast.ml
+13
-3
13 additions, 3 deletions
src/plugins/server/kernel_ast.ml
with
13 additions
and
3 deletions
src/plugins/server/kernel_ast.ml
+
13
−
3
View file @
5c9e99e5
...
...
@@ -761,10 +761,20 @@ let () = Information.register
match
loc
with
|
PType
typ
->
typ
|
PGlobal
(
GType
(
ti
,_
))
->
ti
.
ttype
|
PGlobal
(
GCompTagDecl
(
ci
,_
))
->
TComp
(
ci
,
[]
)
|
PGlobal
(
GEnumTagDecl
(
ei
,_
))
->
TEnum
(
ei
,
[]
)
|
PGlobal
(
GCompTagDecl
(
ci
,_
)
|
GCompTag
(
ci
,_
)
)
->
TComp
(
ci
,
[]
)
|
PGlobal
(
GEnumTagDecl
(
ei
,_
)
|
GEnumTag
(
ei
,_
)
)
->
TEnum
(
ei
,
[]
)
|
_
->
raise
Not_found
in
Format
.
fprintf
fmt
"%i bits"
(
Cil
.
bitsSizeOf
typ
)
in
let
bits
=
Cil
.
bitsSizeOf
typ
in
let
bytes
=
bits
/
8
in
let
rbits
=
bits
mod
8
in
if
rbits
>
0
then
if
bytes
>
0
then
Format
.
fprintf
fmt
"%d bytes + %d bits"
bytes
rbits
else
Format
.
fprintf
fmt
"%d bits"
rbits
else
Format
.
fprintf
fmt
"%d bytes"
bytes
end
(* -------------------------------------------------------------------------- *)
...
...
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