abi{dw,diff}: Better error messages when alternate debuginfo not found
authorDodji Seketeli <dodji@redhat.com>
Tue, 11 Apr 2023 09:36:15 +0000 (11:36 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 11 Apr 2023 09:36:15 +0000 (11:36 +0200)
commitacb456a9c20c6985d2f536cb1f752064214b87f9
treea29ddfc92b85c9c6fe220732ebf08a375e5b4915
parent3b0069064ed33b3c95b05f45209286a36a2506e1
abi{dw,diff}: Better error messages when alternate debuginfo not found

When the alternate debug info referenced by the main debug info file
is missing, both abidw and abidiff fail to explain what is happening
to the user.  The patch adds explicit error messages to those two
programs in that case.

* tools/abidiff.cc (handle_error): Handle cases where the
fe_iface::STATUS[_ALT]_DEBUG_INFO_NOT_FOUND bits are set. Refer to
the alternate debug info file in the error message.
* tools/abidw.cc (load_corpus_and_write_abixml): Do not clear the
reader before emitting the error message, rather clear it after.
Also, refer to the alternate debug info file in the error message.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
tools/abidiff.cc
tools/abidw.cc