X-Git-Url: http://git.annexia.org/?p=virt-mem.git;a=blobdiff_plain;f=extract%2Fcodegen%2Fcode_generation.mli;fp=extract%2Fcodegen%2Fcode_generation.mli;h=b803e71280f50df8e9043daaf1024c31d605a9c6;hp=e3596475bf793ca3e88ff9cb63789f4075b55c48;hb=62b4fb5d778b12af1ed90c4f7934a34e10e1ba9d;hpb=75dd862f41569df1f9f512ea3d9414fe3ea423f1 diff --git a/extract/codegen/code_generation.mli b/extract/codegen/code_generation.mli index e359647..b803e71 100644 --- a/extract/codegen/code_generation.mli +++ b/extract/codegen/code_generation.mli @@ -36,13 +36,10 @@ type code = val generate_types : (string - * Struct_classify.shape_field_struct list - * Struct_classify.content_field_struct list) list -> + * (string * (Pahole_parser.f_type * bool)) list) list -> code - (** [generate_types structures] generates the internal - types used to store variants of each structure, including: - - shape field structures - - content field structures + (** [generate_types structures] generates the + types used to store each structure. *) (** {2 Generate offset functions} @@ -56,7 +53,7 @@ val generate_types : val generate_offsets : (string * ((Pahole_parser.info * Pahole_parser.structure) list - * (string * Pahole_parser.f_type) list)) list -> + * (string * (Pahole_parser.f_type * bool)) list)) list -> code (** [generate_offsets] generates the offset functions. *) @@ -66,7 +63,9 @@ val generate_offsets : into our internal types. *) -val generate_parsers : (string * Struct_classify.parser_ list) list -> +val generate_parsers : + (string * ((string * (Pahole_parser.f_type * bool)) list + * Minimizer.parser_ list)) list -> code * (string, string) Hashtbl.t (** [generate_parsers] generates the parser functions. @@ -76,6 +75,18 @@ val generate_parsers : (string * Struct_classify.parser_ list) list -> by the contents of the returned hash table in {!output_implem}. *) +(** {2 Generate version maps} + + The version maps are functions such as [size_of_ kernel_version] + which return some aspects of the structures and fields that + depend at runtime on the kernel version. +*) + +val generate_version_maps : + (string * ((Pahole_parser.info * Pahole_parser.structure) list + * (string, Minimizer.parser_) Hashtbl.t)) list -> + code + (** {2 Generate followers} The "followers" are functions which recursively follow every @@ -86,9 +97,8 @@ val generate_parsers : (string * Struct_classify.parser_ list) list -> *) val generate_followers : - (string * ((Pahole_parser.info * Pahole_parser.structure) list - * Struct_classify.shape_field_struct list - * Struct_classify.sfhash * Struct_classify.pahash)) list -> + string list -> + (string * (string * (Pahole_parser.f_type * bool)) list) list -> code (** [generate_followers] generates the follower functions. *) @@ -99,6 +109,7 @@ val output_interf : output_file:string -> Camlp4.PreCast.Syntax.Ast.sig_item -> Camlp4.PreCast.Syntax.Ast.sig_item -> Camlp4.PreCast.Syntax.Ast.sig_item -> + Camlp4.PreCast.Syntax.Ast.sig_item -> unit (** Output the interface file. *) @@ -108,5 +119,6 @@ val output_implem : output_file:string -> Camlp4.PreCast.Syntax.Ast.str_item -> (string, string) Hashtbl.t -> Camlp4.PreCast.Syntax.Ast.str_item -> + Camlp4.PreCast.Syntax.Ast.str_item -> unit (** Output the implementation file. *)