3 * dump convert program required by both vmconvert and vmur
5 * Copyright IBM Corp. 2004, 2008.
7 * Author(s): Michael Holzheu
11 #include "lkcd_dump.h"
14 vm_convert(const char* inputFileName
, const char* outputFileName
,
17 /* Do the conversion */
19 switch(VMDump::getDumpType(inputFileName
)){
20 case Dump::DT_VM64_BIG
:
25 vmdump
= new VMDump64Big(inputFileName
);
27 lkcddump
= new LKCDDump64(vmdump
,
28 vmdump
->getRegisterContent());
29 lkcddump
->writeDump(outputFileName
);
39 vmdump
= new VMDump64(inputFileName
);
41 lkcddump
= new LKCDDump64(vmdump
,
42 vmdump
->getRegisterContent());
43 lkcddump
->writeDump(outputFileName
);
53 vmdump
= new VMDump32(inputFileName
);
55 lkcddump
= new LKCDDump32(vmdump
,
56 vmdump
->getRegisterContent());
57 lkcddump
->writeDump(outputFileName
);
63 throw DumpException("This is not a vmdump");
65 } catch (DumpException ex
) {
66 printf("%s: %s\n", progName
, ex
.what());