CP-6715: Add CoreInfo class to wrap vmcoreinfo data.

The CoreInfo class wraps pointers to data from VMCOREINFO ELF notes,
deleting it when the object goes out of scope. Ownership may be
transferred from one CoreInfo object to another. Only one CoreInfo
object will own a resource at any time. CoreInfo objects can be told to
destroy the data they own at any time, allowing them to be used as local
variables or member variables, benefitting from RAII while still having
fine control over the lifetime of the owned resource.
CP-6715: Add VMCOREINFO note parsing to Host class.

A Host object will now parse the ELF notes corresponding to VMCOREINFO
pages and store the relevant parts of the results in CoreInfo member
variables of the Host object itself for later use (after the Elf object
has been destroyed).
CP-6715: Dump Xen and dom0 VMCOREINFO data.
Use $(CXX) in Makefile, and add rule to check with clang static analyzer.
CP-6820: Read vmcoreinfo_note symbol and dump data to dom0.log
Fix doxygen warnings.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CA-121039: Truncate the correct string

With the allocation of 'name' and 'data' close to each other on the heap, this
manifests on my test system as putting a NULL terminator in the middle of the
'data' string, and the printed result looking odd.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Add tags to .gitignore
CP-6716: Read dom0 vmcoreinfo into a CoreInfo object, and use it to print data.

This allows the vmcoreinfo data to persist beyond
Domain::print_vmcoreinfo(), in preparation for use within
Domain::print_console().
CP-6716: Add key lookup & value parsing to CoreInfo class.

Provide a mechanism to perform key lookup and interpet value as a
string, 64-bit virtual address, 16-bit unsigned integer or 32-bit
unsigned integer.
CP-6716: Find and dump dom0 console buffer to dom0.log

Find the Linux 3.x console buffer through information contained in the
vmcoreinfo page, and dump console buffer text entries to dom0.log.

Signed-off-by: Don Slutz <dslutz@verizon.com>
Signed-off-by: Andrew J. Bennieston <andrew.bennieston@citrix.com>
Correctly read 64bit dom0 kernel consoles.

log_buf_len, log_{first,next}_idx are u32's in the source, so are not
conditional on the domain width.

log_buf is a pointer so has to remain conditional on the domain width.

Reported-by: Don Slutz <dslutz@verizon.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>