4 We build all the tools into a single virt-mem executable, in order to
5 share the most runtime. Almost all the code between individual tools
10 - The common core of all the tools. Library, kernel symbols, command
11 line handling, memory images, etc.
13 lib/virt_mem.ml contains most of the important 'glue' code.
19 - The code specific to each tool. This is usually rather small because
20 the code in lib/ does the hard work.
24 - This brings everything together and links it into a single executable.
25 Other than that purpose, there is almost nothing in this directory.
27 General structure of lib/virt_mem.ml
28 ------------------------------------
30 We start with a bare kernel memory image ('Virt_mem_types.image0')
31 which gets successively enhanced with extra data along the way:
33 Parse command line arguments,
34 work out what virtual machines to
35 process, load kernel images
38 | (passes a 'Virt_mem_types.image0')
44 | (enhanced into a 'Virt_mem_types.image1')
47 Find kernel version (uname)
50 | (enhanced into a 'Virt_mem_types.image2')
53 Call tool's "run" function.
55 Tools can register other callbacks which get called at earlier stages.