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
c81c4028
Commit
c81c4028
authored
4 years ago
by
Valentin Perrelle
Committed by
Andre Maroneze
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] allow -dump-config to also dump the list of options and values
parent
f2206c1a
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/kernel_internals/runtime/dump_config.ml
+23
-1
23 additions, 1 deletion
src/kernel_internals/runtime/dump_config.ml
with
23 additions
and
1 deletion
src/kernel_internals/runtime/dump_config.ml
+
23
−
1
View file @
c81c4028
...
@@ -20,6 +20,26 @@
...
@@ -20,6 +20,26 @@
(* *)
(* *)
(**************************************************************************)
(**************************************************************************)
let
list_plugins_names
()
=
Plugin
.
fold_on_plugins
(
fun
p
acc
->
p
.
Plugin
.
p_name
::
acc
)
[]
let
dump_parameter
tp
=
let
open
Typed_parameter
in
let
json_value
=
match
tp
.
accessor
with
|
Bool
(
accessor
,_
)
->
`Bool
(
accessor
.
get
()
)
|
Int
(
accessor
,_
)
->
`Int
(
accessor
.
get
()
)
|
String
(
accessor
,_
)
->
`String
(
accessor
.
get
()
)
in
tp
.
name
,
json_value
let
dump_all_parameters
()
=
let
add_category
_
l
acc
=
List
.
fold_left
(
fun
acc
tp
->
dump_parameter
tp
::
acc
)
acc
l
in
let
add_plugin
plugin
acc
=
Hashtbl
.
fold
add_category
plugin
.
Plugin
.
p_parameters
acc
in
Plugin
.
fold_on_plugins
add_plugin
[]
let
dump_to_json
()
=
let
dump_to_json
()
=
let
string
s
=
`String
s
in
let
string
s
=
`String
s
in
...
@@ -50,7 +70,9 @@ let dump_to_json () =
...
@@ -50,7 +70,9 @@ let dump_to_json () =
"preprocessor_keep_comments"
,
`Bool
Fc_config
.
preprocessor_keep_comments
;
"preprocessor_keep_comments"
,
`Bool
Fc_config
.
preprocessor_keep_comments
;
"dot"
,
(
match
Fc_config
.
dot
with
Some
cmd
->
`String
cmd
|
None
->
`Null
)
;
"dot"
,
(
match
Fc_config
.
dot
with
Some
cmd
->
`String
cmd
|
None
->
`Null
)
;
"current_machdep"
,
`String
(
Kernel
.
Machdep
.
get
()
)
;
"current_machdep"
,
`String
(
Kernel
.
Machdep
.
get
()
)
;
"machdeps"
,
list
string
(
File
.
list_available_machdeps
()
)
"machdeps"
,
list
string
(
File
.
list_available_machdeps
()
)
;
"plugins"
,
list
string
(
list_plugins_names
()
)
;
"parameters"
,
`Assoc
(
dump_all_parameters
()
)
;
]
]
let
dump_to_stdout
()
=
let
dump_to_stdout
()
=
...
...
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