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