+ (** Optional data derived from the raw kernel image by the main
+ program and passed to the tools' [~run] functions.
+
+ What fields get filled in is controlled by the [~needs_*]
+ options passed when tools register themselves, and also of
+ course by what we are able to find out about the memory image.
+
+ Note there is significant cost to filling in some of these
+ fields.
+*)
+
+(** {2 Kernel structure parsers} *)
+
+exception ParseError of string * string * string
+ (** Parsing exception raised by [Kernel_*] parser functions.
+
+ The fields are: structure name, function which raised the error,
+ error message. *)
+
+type fieldsig = {
+ field_available : bool; (** Field available in this kernel version? *)
+ field_offset : int; (** Offset of field in this kernel version. *)
+}
+ (** Returned by [Kernel_*.field_signature_of_*] functions. *)
+
+(** {2 Load kernel memory} *)
+
+type load_memory_error =
+ | AddressOutOfRange (** Address not in [kernel_min..kernel_max] *)
+ | DomIsNull (** image.dom = None *)
+
+exception LoadMemoryError of load_memory_error * string
+
+val load_memory : image -> Virt_mem_mmap.addr -> int -> image
+ (** [load_memory img start size] tries to load [size] bytes from
+ the start address into the memory map. If the memory was loaded
+ previously, then it is not requested again.
+
+ Note that the memory map may be updated by this, so a modified
+ image structure is returned.
+
+ This function can raise many different sorts of exceptions and
+ the caller is advised to catch any exceptions and deal with them
+ appropriately. *)