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
dd13710c
Commit
dd13710c
authored
1 year ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[ivette/inspector] fix type descriptions
parent
012cf6f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ivette/src/frama-c/kernel/ASTinfo.tsx
+1
-5
1 addition, 5 deletions
ivette/src/frama-c/kernel/ASTinfo.tsx
src/plugins/server/kernel_ast.ml
+14
-6
14 additions, 6 deletions
src/plugins/server/kernel_ast.ml
src/plugins/server/kernel_ast.mli
+1
-1
1 addition, 1 deletion
src/plugins/server/kernel_ast.mli
with
16 additions
and
12 deletions
ivette/src/frama-c/kernel/ASTinfo.tsx
+
1
−
5
View file @
dd13710c
...
...
@@ -168,11 +168,7 @@ function MarkInfos(props: InfoSectionProps): JSX.Element {
States
.
setMarked
(
m
,
m
!==
marker
);
break
;
case
'
DOUBLE
'
:
{
const
{
scope
,
definition
}
=
States
.
getMarker
(
m
);
if
(
scope
||
definition
)
States
.
setSelected
(
scope
?
m
:
definition
);
}
States
.
setSelected
(
m
);
break
;
}
};
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/kernel_ast.ml
+
14
−
6
View file @
dd13710c
...
...
@@ -221,7 +221,7 @@ module Marker = MakeTag
|
PType
_
->
Printf
.
sprintf
"#y%d"
(
incr
kid
;
!
kid
)
end
)
module
Printer
=
Printer_tag
.
Make
(
struct
let
tag
=
Marker
.
index
end
)
module
Printer
Tag
=
Printer_tag
.
Make
(
struct
let
tag
=
Marker
.
index
end
)
(* -------------------------------------------------------------------------- *)
(* --- Ast Data --- *)
...
...
@@ -395,7 +395,7 @@ let print_global_ast global =
let
stacked_libc
=
Kernel
.
PrintLibc
.
get
()
in
try
if
not
stacked_libc
then
Kernel
.
PrintLibc
.
set
true
;
let
printer
=
Printer
.(
with_unfold_precond
(
fun
_
->
true
)
pp_global
)
in
let
printer
=
Printer
Tag
.(
with_unfold_precond
(
fun
_
->
true
)
pp_global
)
in
let
ast
=
Jbuffer
.
to_json
printer
global
in
if
not
stacked_libc
then
Kernel
.
PrintLibc
.
set
false
;
ast
with
err
->
...
...
@@ -474,11 +474,12 @@ struct
|
PGlobal
_
->
if
short
then
"Decl"
else
"Declaration"
let
descr_localizable
fmt
=
function
|
PGlobal
(
GType
(
ti
,_
))
->
Printer
.
pp_typ
fmt
(
TNamed
(
ti
,
[]
))
|
PGlobal
(
GType
(
ti
,_
))
->
PrinterTag
.
pp_typ
fmt
(
TNamed
(
ti
,
[]
))
|
PGlobal
(
GCompTag
(
ci
,_
)
|
GCompTagDecl
(
ci
,_
))
->
Printer
.
pp_typ
fmt
(
TComp
(
ci
,
[]
))
Printer
Tag
.
pp_typ
fmt
(
TComp
(
ci
,
[]
))
|
PGlobal
(
GEnumTag
(
ei
,_
)
|
GEnumTagDecl
(
ei
,_
))
->
Printer
.
pp_typ
fmt
(
TEnum
(
ei
,
[]
))
Printer
Tag
.
pp_typ
fmt
(
TEnum
(
ei
,
[]
))
|
g
->
pp_localizable
fmt
g
let
model
=
States
.
model
()
...
...
@@ -845,7 +846,14 @@ let () = Information.register
match
loc
with
|
PType
(
TNamed
_
as
ty
)
|
PGlobal
(
GType
({
ttype
=
ty
}
,_
))
->
Printer
.
pp_typ
fmt
(
Cil
.
unrollType
ty
)
begin
let
tdef
=
Cil
.
unrollType
ty
in
match
Printer_tag
.
definition_of_type
tdef
with
|
Some
marker
->
let
tag
=
Marker
.
index
marker
in
Format
.
fprintf
fmt
"@{<%s>%a@}"
tag
Printer
.
pp_typ
tdef
|
None
->
PrinterTag
.
pp_typ
fmt
tdef
end
|
_
->
raise
Not_found
end
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/kernel_ast.mli
+
1
−
1
View file @
dd13710c
...
...
@@ -72,7 +72,7 @@ module Kinstr : Data.S with type t = kinstr
(** Ast Printer *)
(* -------------------------------------------------------------------------- *)
module
Printer
:
Printer_tag
.
S_pp
module
Printer
Tag
:
Printer_tag
.
S_pp
(* -------------------------------------------------------------------------- *)
(** Ast Information *)
...
...
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