Switch kernel header parsing to python libclang
Replace the tokenizer in cpp.py with libclang. Bug: 18937958 Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
This commit is contained in:
@@ -22,46 +22,46 @@
|
||||
#define SOM_PAGESIZE 4096
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct som_hdr {
|
||||
short system_id;
|
||||
short a_magic;
|
||||
unsigned int version_id;
|
||||
short system_id;
|
||||
short a_magic;
|
||||
unsigned int version_id;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct timespec file_time;
|
||||
unsigned int entry_space;
|
||||
unsigned int entry_subspace;
|
||||
unsigned int entry_offset;
|
||||
struct timespec file_time;
|
||||
unsigned int entry_space;
|
||||
unsigned int entry_subspace;
|
||||
unsigned int entry_offset;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int aux_header_location;
|
||||
unsigned int aux_header_size;
|
||||
unsigned int som_length;
|
||||
unsigned int presumed_dp;
|
||||
unsigned int aux_header_location;
|
||||
unsigned int aux_header_size;
|
||||
unsigned int som_length;
|
||||
unsigned int presumed_dp;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int space_location;
|
||||
unsigned int space_total;
|
||||
unsigned int subspace_location;
|
||||
unsigned int subspace_total;
|
||||
unsigned int space_location;
|
||||
unsigned int space_total;
|
||||
unsigned int subspace_location;
|
||||
unsigned int subspace_total;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int loader_fixup_location;
|
||||
unsigned int loader_fixup_total;
|
||||
unsigned int space_strings_location;
|
||||
unsigned int space_strings_size;
|
||||
unsigned int loader_fixup_location;
|
||||
unsigned int loader_fixup_total;
|
||||
unsigned int space_strings_location;
|
||||
unsigned int space_strings_size;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int init_array_location;
|
||||
unsigned int init_array_total;
|
||||
unsigned int compiler_location;
|
||||
unsigned int compiler_total;
|
||||
unsigned int init_array_location;
|
||||
unsigned int init_array_total;
|
||||
unsigned int compiler_location;
|
||||
unsigned int compiler_total;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int symbol_location;
|
||||
unsigned int symbol_total;
|
||||
unsigned int fixup_request_location;
|
||||
unsigned int fixup_request_total;
|
||||
unsigned int symbol_location;
|
||||
unsigned int symbol_total;
|
||||
unsigned int fixup_request_location;
|
||||
unsigned int fixup_request_total;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int symbol_strings_location;
|
||||
unsigned int symbol_strings_size;
|
||||
unsigned int unloadable_sp_location;
|
||||
unsigned int unloadable_sp_size;
|
||||
unsigned int symbol_strings_location;
|
||||
unsigned int symbol_strings_size;
|
||||
unsigned int unloadable_sp_location;
|
||||
unsigned int unloadable_sp_size;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int checksum;
|
||||
unsigned int checksum;
|
||||
};
|
||||
#define SOM_SID_PARISC_1_0 0x020b
|
||||
#define SOM_SID_PARISC_1_1 0x0210
|
||||
@@ -81,90 +81,90 @@ struct som_hdr {
|
||||
#define SOM_ID_NEW 87102412
|
||||
struct aux_id {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int mandatory :1;
|
||||
unsigned int copy :1;
|
||||
unsigned int append :1;
|
||||
unsigned int ignore :1;
|
||||
unsigned int mandatory : 1;
|
||||
unsigned int copy : 1;
|
||||
unsigned int append : 1;
|
||||
unsigned int ignore : 1;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int reserved :12;
|
||||
unsigned int type :16;
|
||||
unsigned int length;
|
||||
unsigned int reserved : 12;
|
||||
unsigned int type : 16;
|
||||
unsigned int length;
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct som_exec_auxhdr {
|
||||
struct aux_id som_auxhdr;
|
||||
int exec_tsize;
|
||||
int exec_tmem;
|
||||
struct aux_id som_auxhdr;
|
||||
int exec_tsize;
|
||||
int exec_tmem;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
int exec_tfile;
|
||||
int exec_dsize;
|
||||
int exec_dmem;
|
||||
int exec_dfile;
|
||||
int exec_tfile;
|
||||
int exec_dsize;
|
||||
int exec_dmem;
|
||||
int exec_dfile;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
int exec_bsize;
|
||||
int exec_entry;
|
||||
int exec_flags;
|
||||
int exec_bfill;
|
||||
int exec_bsize;
|
||||
int exec_entry;
|
||||
int exec_flags;
|
||||
int exec_bfill;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
};
|
||||
union name_pt {
|
||||
char * n_name;
|
||||
unsigned int n_strx;
|
||||
char * n_name;
|
||||
unsigned int n_strx;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
};
|
||||
struct space_dictionary_record {
|
||||
union name_pt name;
|
||||
unsigned int is_loadable :1;
|
||||
union name_pt name;
|
||||
unsigned int is_loadable : 1;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int is_defined :1;
|
||||
unsigned int is_private :1;
|
||||
unsigned int has_intermediate_code :1;
|
||||
unsigned int is_tspecific :1;
|
||||
unsigned int is_defined : 1;
|
||||
unsigned int is_private : 1;
|
||||
unsigned int has_intermediate_code : 1;
|
||||
unsigned int is_tspecific : 1;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int reserved :11;
|
||||
unsigned int sort_key :8;
|
||||
unsigned int reserved2 :8;
|
||||
int space_number;
|
||||
unsigned int reserved : 11;
|
||||
unsigned int sort_key : 8;
|
||||
unsigned int reserved2 : 8;
|
||||
int space_number;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
int subspace_index;
|
||||
unsigned int subspace_quantity;
|
||||
int loader_fix_index;
|
||||
unsigned int loader_fix_quantity;
|
||||
int subspace_index;
|
||||
unsigned int subspace_quantity;
|
||||
int loader_fix_index;
|
||||
unsigned int loader_fix_quantity;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
int init_pointer_index;
|
||||
unsigned int init_pointer_quantity;
|
||||
int init_pointer_index;
|
||||
unsigned int init_pointer_quantity;
|
||||
};
|
||||
struct subspace_dictionary_record {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
int space_index;
|
||||
unsigned int access_control_bits :7;
|
||||
unsigned int memory_resident :1;
|
||||
unsigned int dup_common :1;
|
||||
int space_index;
|
||||
unsigned int access_control_bits : 7;
|
||||
unsigned int memory_resident : 1;
|
||||
unsigned int dup_common : 1;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int is_common :1;
|
||||
unsigned int quadrant :2;
|
||||
unsigned int initially_frozen :1;
|
||||
unsigned int is_first :1;
|
||||
unsigned int is_common : 1;
|
||||
unsigned int quadrant : 2;
|
||||
unsigned int initially_frozen : 1;
|
||||
unsigned int is_first : 1;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int code_only :1;
|
||||
unsigned int sort_key :8;
|
||||
unsigned int replicate_init :1;
|
||||
unsigned int continuation :1;
|
||||
unsigned int code_only : 1;
|
||||
unsigned int sort_key : 8;
|
||||
unsigned int replicate_init : 1;
|
||||
unsigned int continuation : 1;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int is_tspecific :1;
|
||||
unsigned int is_comdat :1;
|
||||
unsigned int reserved :4;
|
||||
int file_loc_init_value;
|
||||
unsigned int is_tspecific : 1;
|
||||
unsigned int is_comdat : 1;
|
||||
unsigned int reserved : 4;
|
||||
int file_loc_init_value;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int initialization_length;
|
||||
unsigned int subspace_start;
|
||||
unsigned int subspace_length;
|
||||
unsigned int reserved2 :5;
|
||||
unsigned int initialization_length;
|
||||
unsigned int subspace_start;
|
||||
unsigned int subspace_length;
|
||||
unsigned int reserved2 : 5;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
unsigned int alignment :27;
|
||||
union name_pt name;
|
||||
int fixup_request_index;
|
||||
unsigned int fixup_request_quantity;
|
||||
unsigned int alignment : 27;
|
||||
union name_pt name;
|
||||
int fixup_request_index;
|
||||
unsigned int fixup_request_quantity;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user