From 66ad27b9b9e8e35a5df9da53d322b3fce349c819 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Updated HACKING docs. --- HACKING | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/HACKING b/HACKING index 12cb191..bedcc68 100644 --- a/HACKING +++ b/HACKING @@ -1,3 +1,6 @@ +Source files +------------ + We build all the tools into a single virt-mem executable, in order to share the most runtime. Almost all the code between individual tools is shared anyway. @@ -20,3 +23,33 @@ mem/ - This brings everything together and links it into a single executable. Other than that purpose, there is almost nothing in this directory. + +General structure of lib/virt_mem.ml +------------------------------------ + +We start with a bare kernel memory image ('Virt_mem_types.image0') +which gets successively enhanced with extra data along the way: + + Parse command line arguments, + work out what virtual machines to + process, load kernel images + + | + | (passes a 'Virt_mem_types.image0') + V + + Find kernel symbols + + | + | (enhanced into a 'Virt_mem_types.image1') + V + + Find kernel version (uname) + + | + | (enhanced into a 'Virt_mem_types.image2') + V + + Call tool's "run" function. + +Tools can register other callbacks which get called at earlier stages. \ No newline at end of file -- 1.8.3.1