Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> writes: > It would be nice to have Error object not freed away when debugging a > coredump. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > > v2: don't change error output format > > util/error.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/util/error.c b/util/error.c > index 934a78e1b1..22f8a7924f 100644 > --- a/util/error.c > +++ b/util/error.c > @@ -34,7 +34,10 @@ 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("%s", error_get_pretty(err)); > + if (err->hint) { > + error_printf_unless_qmp("%s", err->hint->str); > + } > abort(); > } > if (errp == &error_fatal) {
We've since found out that the hint should be printed with error_printf(), see "[PATCH] error: Fix error_report_err(), warn_report_err() hint printing". With that: Reviewed-by: Markus Armbruster <arm...@redhat.com> Queued with this change. Thanks!