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.
29 - The database of known kernels and the layout of their structures.
33 - Tools to extract the structure layout data from kernels. Various
34 subdirectories here correspond to the different Linux distributions
35 and methods of getting at their kernels.
37 General structure of lib/virt_mem.ml
38 ------------------------------------
40 We start with a bare kernel memory image ('Virt_mem_types.image0')
41 which gets successively enhanced with extra data along the way:
43 Parse command line arguments,
44 work out what virtual machines to
45 process, load kernel images
48 | (passes a 'Virt_mem_types.image0')
54 | (enhanced into a 'Virt_mem_types.image1')
57 Find kernel version (uname)
60 | (enhanced into a 'Virt_mem_types.image2')
63 Call tool's "run" function.
65 Tools can register other callbacks which get called at earlier stages.