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
8221a9a1
Commit
8221a9a1
authored
1 month ago
by
Cécile Ruet-Cros
Committed by
Virgile Prevosto
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] issue #1474: + .mli doc + runt.t: -print
parent
ec1eaef2
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/plugin_entry_points/kernel.mli
+11
-0
11 additions, 0 deletions
src/kernel_services/plugin_entry_points/kernel.mli
tests/misc/machdep.t/run.t
+56
-7
56 additions, 7 deletions
tests/misc/machdep.t/run.t
with
67 additions
and
7 deletions
src/kernel_services/plugin_entry_points/kernel.mli
+
11
−
0
View file @
8221a9a1
...
...
@@ -472,8 +472,19 @@ module UnfoldingForce: Parameter_sig.Bool
called for well preparing the AST. *)
module
Machdep
:
sig
include
Parameter_sig
.
String
(** [get_dir] returns the directory containing default machdeps.
@since Frama-C+dev *)
val
get_dir
:
unit
->
LoadState
.
t
(** [get_default_file] return the file with the name format of machdep from
the default machdep directory.
@since Frama-C+dev *)
val
get_default_file
:
string
->
LoadState
.
t
(** [is_default] decides if the parameter refers to a default machdep or a
user file.
@since Frama-C+dev *)
val
is_default
:
string
->
bool
end
...
...
This diff is collapsed.
Click to expand it.
tests/misc/machdep.t/run.t
+
56
−
7
View file @
8221a9a1
...
...
@@ -22,10 +22,11 @@
__retres
=
8388607
-
1
;
return
__retres
;
}
Note:
we
can
'
t use only -D below, as the __fc_machdep.h define takes precedence.With -U, our cmdline definition is used in the code
Note:
we
can
'
t use only -D below, as the __fc_machdep.h define takes precedence. With -U, our cmdline definition is used in the code
$ frama-c -no-autoload-plugins -check custom_machdep.c -cpp-extra-args="-UCUSTOM_MACHDEP -DCUSTOM_MACHDEP=42" -machdep custom_machdep.yaml -print
[kernel] Parsing custom_machdep.c (with preprocessing)
/* Generated by Frama-C */
...
...
@@ -50,11 +51,59 @@ Note: we can't use only -D below, as the __fc_machdep.h define takes precedence.
__retres = 8388607 - 42;
return __retres;
}
We want to ensure that `-load` works independently of in which directory the
corresponding `-save` was performed
$ frama-c -no-autoload-plugins -check -machdep custom_machdep.yaml custom_machdep.c -save custom_machdep.sav
$ frama-c -no-autoload-plugins -check -machdep custom_machdep.yaml custom_machdep.c -save custom_machdep.sav
-print
[kernel] Parsing custom_machdep.c (with preprocessing)
$ mkdir -p subdir && (cd subdir && frama-c -no-autoload-plugins -load ../custom_machdep.sav)
/* Generated by Frama-C */
#include "ctype.h"
#include "errno.h"
#include "inttypes.h"
#include "locale.h"
#include "math.h"
#include "signal.h"
#include "stdarg.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "strings.h"
#include "time.h"
#include "wchar.h"
int main(void)
{
int __retres;
__retres = 8388607 - 1;
return __retres;
}
$ mkdir -p subdir && (cd subdir && frama-c -no-autoload-plugins -load ../custom_machdep.sav -print)
/* Generated by Frama-C */
#include "ctype.h"
#include "errno.h"
#include "inttypes.h"
#include "locale.h"
#include "math.h"
#include "signal.h"
#include "stdarg.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "strings.h"
#include "time.h"
#include "wchar.h"
int main(void)
{
int __retres;
__retres = 8388607 - 1;
return __retres;
}
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