1 (* Memory info for virtual domains.
2 (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 (** A kernel symbol name. *)
26 * Virt_mem_utils.architecture
27 * ([`Wordsize], [`Endian]) Virt_mem_mmap.t
28 (** A memory image from a domain. *)
30 type image_with_ksyms =
33 * Virt_mem_utils.architecture
34 * ([`Wordsize], [`Endian]) Virt_mem_mmap.t
35 * (ksym -> Virt_mem_mmap.addr)
36 (** An image after it has been processed to find kernel symbols.
39 - domain ID (if known)
40 - name, usually the domain name
41 - architecture (eg. I386)
42 - kernel memory map (wordsize & endianness already determined)
43 - a function to look up kernel symbols. It raises [Not_found]
44 if a kernel symbol could not be found or if the kernel symbol
45 table could not be found at all.
50 ?extra_args:(Arg.key * Arg.spec * Arg.doc) list ->
51 ?argcheck:(bool -> unit) ->
52 ?beforeksyms:(bool -> image list -> unit) ->
53 ?run:(bool -> image_with_ksyms list -> unit) ->
54 string -> string -> Arg.usage_msg ->
56 (** Tools register themselves with this call.
58 The anonymous parameters are:
59 - tool name (eg. "uname")
63 The optional callback functions are:
64 - [?argcheck] called after arguments have been fully parsed
65 so that the program can do any additional checks needed (eg.
67 - [?beforeksyms] called after images are loaded and before
68 kernel symbols are analyzed,
69 - [?run] called after kernel symbols have been analyzed
70 (almost all tools supply this callback function).
72 Pass [~external_cmd:false] if this tool doesn't have an
73 external 'virt-tool' link.
75 Pass [~extra_args:...] if this tool needs extra command
79 val main : unit -> unit
80 (** Entry point for the combined virt-mem executable. *)