Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libdrgn: better error reporting of unsupported libkdumpfile format
Return DRGN_ERROR_INVALID_ARGUMENT with a reasonable error message if libkdumpfile cannot open a file. The error output currently looks something like: Traceback (most recent call last): File "/research/bin/drgn", line 33, in <module> sys.exit(load_entry_point('drgn', 'console_scripts', 'drgn')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/research/src/drgn/drgn/cli.py", line 264, in _main prog.set_core_dump(args.core) Exception: kdump_set_number_attr(KDUMP_ATTR_FILE_FD): File #0: Unknown file format Replace it with this: error: file #0: Unknown file format This is similar to the error message when trying to open a file that is neither KDUMP nor ELF: error: not an ELF core file Signed-off-by: Petr Tesarik <[email protected]>
- Loading branch information