-
Notifications
You must be signed in to change notification settings - Fork 22
Crash Utility
Petr Tesarik edited this page Jul 23, 2015
·
1 revision
At some point, I'd like to convert the crash
utility to use libkdumpfile
as its backend. Ideally, it should be a drop-in replacement without any regressions. However, even understanding the crash
utility is a challenge, because the tool is so unbelievably misdesigned…
Some of the hard-to-grasp concepts:
- For some reason, ELF dump is called netdump.
- Lots of file-local variables are grouped in a struct, but a pointer is used to access the struct, with a shorter but sometimes unrelated name. E.g. vmcore_data is referenced through nd->.
- These file-local variables are sometimes referenced by macros exposed in the (global) defs.h, although such macros cannot be used outside of the respective file.
- There is no clean separation of file formats and content. For example, Xen-specific processing is local to netdump.c. As if other file formats could not contain a Xen Dom0 dump.
- Xen machine addresses are first translated to Dom0 physical address in readmem() and then translated back to Dom0 addresses in read_kdump(). Except when the machine address does not correspond to any Dom0 address, in which case readmem() sets XEN_MACHINE_ADDR in pc->curcmd_flags.