It would be nice to have Error object not freed away when debugging a coredump.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> --- util/error.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util/error.c b/util/error.c index 934a78e1b1..f9180c0f30 100644 --- a/util/error.c +++ b/util/error.c @@ -32,9 +32,11 @@ Error *error_fatal; static void error_handle_fatal(Error **errp, Error *err) { if (errp == &error_abort) { - fprintf(stderr, "Unexpected error in %s() at %s:%d:\n", - err->func, err->src, err->line); - error_report_err(err); + error_report("Unexpected error in %s() at %s:%d: %s", + err->func, err->src, err->line, error_get_pretty(err)); + if (err->hint) { + error_printf_unless_qmp("%s", err->hint->str); + } abort(); } if (errp == &error_fatal) { -- 2.18.0