@@ -6,16 +6,13 @@ use std::path::PathBuf;
66#[ derive( Debug , Clone ) ]
77pub struct LoadSettings {
88 pub add_backing_regions : bool ,
9- pub add_bitfields : bool ,
109 pub add_comments : bool ,
1110 pub auto_load_file : Option < PathBuf > ,
1211}
1312
1413impl LoadSettings {
1514 pub const ADD_BACKING_REGIONS_DEFAULT : bool = true ;
1615 pub const ADD_BACKING_REGIONS_SETTING : & ' static str = "analysis.svd.addBackingRegions" ;
17- pub const ADD_BITFIELDS_DEFAULT : bool = true ;
18- pub const ADD_BITFIELDS_SETTING : & ' static str = "analysis.svd.addBitfields" ;
1916 pub const ADD_COMMENTS_DEFAULT : bool = true ;
2017 pub const ADD_COMMENTS_SETTING : & ' static str = "analysis.svd.addComments" ;
2118 pub const AUTO_LOAD_FILE_DEFAULT : & ' static str = "" ;
@@ -35,17 +32,6 @@ impl LoadSettings {
3532 & add_backing_region_props. to_string ( ) ,
3633 ) ;
3734
38- let add_bitfields_props = json ! ( {
39- "title" : "Add Bitfields" ,
40- "type" : "boolean" ,
41- "default" : Self :: ADD_BITFIELDS_DEFAULT ,
42- "description" : "Whether to add bitfields. Bitfields are not supported by Binary Ninja, so this is a workaround using unions." ,
43- } ) ;
44- bn_settings. register_setting_json (
45- Self :: ADD_BITFIELDS_SETTING ,
46- & add_bitfields_props. to_string ( ) ,
47- ) ;
48-
4935 let add_comments_props = json ! ( {
5036 "title" : "Add Comments" ,
5137 "type" : "boolean" ,
@@ -73,10 +59,6 @@ impl LoadSettings {
7359 load_settings. add_backing_regions =
7460 settings. get_bool_with_opts ( Self :: ADD_BACKING_REGIONS_SETTING , & mut query_opts) ;
7561 }
76- if settings. contains ( Self :: ADD_BITFIELDS_SETTING ) {
77- load_settings. add_bitfields =
78- settings. get_bool_with_opts ( Self :: ADD_BITFIELDS_SETTING , & mut query_opts) ;
79- }
8062 if settings. contains ( Self :: ADD_COMMENTS_SETTING ) {
8163 load_settings. add_comments =
8264 settings. get_bool_with_opts ( Self :: ADD_COMMENTS_SETTING , & mut query_opts) ;
@@ -97,7 +79,6 @@ impl Default for LoadSettings {
9779 fn default ( ) -> Self {
9880 Self {
9981 add_backing_regions : Self :: ADD_BACKING_REGIONS_DEFAULT ,
100- add_bitfields : Self :: ADD_BITFIELDS_DEFAULT ,
10182 add_comments : Self :: ADD_COMMENTS_DEFAULT ,
10283 auto_load_file : None ,
10384 }
0 commit comments