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
6676f750
Commit
6676f750
authored
3 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] Query to know if a kf is the entry point
parent
1c0c5b42
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/kernel_services/ast_data/globals.ml
+7
-0
7 additions, 0 deletions
src/kernel_services/ast_data/globals.ml
src/kernel_services/ast_data/globals.mli
+8
-0
8 additions, 0 deletions
src/kernel_services/ast_data/globals.mli
with
15 additions
and
0 deletions
src/kernel_services/ast_data/globals.ml
+
7
−
0
View file @
6676f750
...
...
@@ -847,6 +847,13 @@ let set_entry_point name lib =
Kernel
.
LibEntry
.
unsafe_set
lib
;
end
let
is_entry_point
?
when_lib_entry
kf
=
match
when_lib_entry
with
|
Some
value
when
Kernel
.
LibEntry
.
get
()
->
value
|
_
->
try
Cil_datatype
.
Kf
.
equal
kf
@@
fst
@@
entry_point
()
with
No_such_entry_point
_
->
false
(* ************************************************************************* *)
(** {2 Global Comments} *)
(* ************************************************************************* *)
...
...
This diff is collapsed.
Click to expand it.
src/kernel_services/ast_data/globals.mli
+
8
−
0
View file @
6676f750
...
...
@@ -293,6 +293,14 @@ val set_entry_point : string -> bool -> unit
[Kernel.MainFunction] or [Kernel.LibEntry].
@plugin development guide *)
val
is_entry_point
:
?
when_lib_entry
:
bool
->
kernel_function
->
bool
(** @return [true] iff the given kernel function is the entry point.
The optional parameter [when_lib_entry] overrides the result if we are
in -lib-entry mode.
@since Frama-C+dev
*)
(* ************************************************************************* *)
(** {2 Comments} *)
(* ************************************************************************* *)
...
...
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