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
beaaea1f
Commit
beaaea1f
authored
5 years ago
by
Valentin Perrelle
Committed by
David Bühler
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Dive] Synchronize with Frama-C master
parent
8b4694bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/dive/server_interface.ml
+29
-32
29 additions, 32 deletions
src/plugins/dive/server_interface.ml
with
29 additions
and
32 deletions
src/plugins/dive/server_interface.ml
+
29
−
32
View file @
beaaea1f
...
@@ -84,37 +84,34 @@ module Variable = Data.Collection (struct
...
@@ -84,37 +84,34 @@ module Variable = Data.Collection (struct
let
of_json
json
=
let
of_json
json
=
let
open
Yojson
.
Basic
.
Util
in
let
open
Yojson
.
Basic
.
Util
in
try
let
funname
=
let
funname
=
try
Some
(
json
|>
member
"fun"
|>
to_string
)
try
Some
(
json
|>
member
"fun"
|>
to_string
)
with
Not_found
->
None
with
Not_found
->
None
and
varname
=
json
|>
member
"var"
|>
to_string
in
and
varname
=
json
|>
member
"var"
|>
to_string
in
match
funname
with
match
funname
with
|
Some
name
->
|
Some
name
->
let
kf
=
let
kf
=
try
try
Globals
.
Functions
.
find_by_name
name
Globals
.
Functions
.
find_by_name
name
with
Not_found
->
with
Not_found
->
Data
.
failure
"no function '%s'"
name
Data
.
failure
json
"no function '%s'"
name
in
in
let
vi
=
let
vi
=
try
Globals
.
Vars
.
find_from_astinfo
varname
(
Cil_types
.
VLocal
kf
)
try
Globals
.
Vars
.
find_from_astinfo
varname
(
Cil_types
.
VLocal
kf
)
with
Not_found
->
with
Not_found
->
try
Globals
.
Vars
.
find_from_astinfo
varname
(
Cil_types
.
VFormal
kf
)
try
Globals
.
Vars
.
find_from_astinfo
varname
(
Cil_types
.
VFormal
kf
)
with
Not_found
->
with
Not_found
->
Data
.
failure
"no variable '%s' in function '%s'"
Data
.
failure
json
"no variable '%s' in function '%s'"
varname
name
varname
name
in
in
vi
vi
|
None
->
match
Globals
.
Syntactic_search
.
find_in_scope
varname
Cil_types
.
Program
with
|
Some
vi
->
vi
|
None
->
|
None
->
match
Data
.
failure
"no global variable '%s'"
varname
Globals
.
Syntactic_search
.
find_in_scope
varname
Cil_types
.
Program
with
|
Some
vi
->
vi
|
None
->
Data
.
failure
json
"no global variable '%s'"
varname
with
Not_found
|
Failure
_
->
Data
.
failure
json
"Invalid source format"
end
)
end
)
module
Function
=
Data
.
Collection
(
struct
module
Function
=
Data
.
Collection
(
struct
...
@@ -133,7 +130,7 @@ module Function = Data.Collection (struct
...
@@ -133,7 +130,7 @@ module Function = Data.Collection (struct
try
try
Globals
.
Functions
.
find_by_name
name
Globals
.
Functions
.
find_by_name
name
with
Not_found
->
with
Not_found
->
Data
.
failure
json
"no function '%s'"
name
Data
.
failure
"no function '%s'"
name
end
)
end
)
module
Node
=
Data
.
Collection
(
struct
module
Node
=
Data
.
Collection
(
struct
...
@@ -152,7 +149,7 @@ module Node = Data.Collection (struct
...
@@ -152,7 +149,7 @@ module Node = Data.Collection (struct
try
try
Build
.
find_node
(
get_graph
()
)
node_key
Build
.
find_node
(
get_graph
()
)
node_key
with
Not_found
->
with
Not_found
->
Data
.
failure
json
"no node '%d' in the current graph"
node_key
Data
.
failure
"no node '%d' in the current graph"
node_key
end
)
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