[PATCH] Fail if dwz fails.
Martin Liška
mliska@suse.cz
Thu May 13 08:01:59 GMT 2021
PING^1
On 4/22/21 1:11 PM, Martin Liška wrote:
> Right now, dwz return code is 0 or a small integer value (<= 3)
> for situations like:
>
> - dwz: Too few files for multifile optimization
> - dwz: Multi-file optimization not allowed for different pointer sizes or endianity
>
> These are not fatal errors and the script should continue. On the other
> hand abort or segfault error values should cause failure of the script.
>
> Let's reserve values 1-16 for a recoverable dwz exit codes.
> ---
> scripts/find-debuginfo.sh | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
> index 3d736e0..7fb9b62 100755
> --- a/scripts/find-debuginfo.sh
> +++ b/scripts/find-debuginfo.sh
> @@ -556,6 +556,10 @@ if $run_dwz \
> && dwz_opts="${dwz_opts} -L ${dwz_max_die_limit}"
> if type dwz >/dev/null 2>&1; then
> ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts ${dwz_files[@]} )
> + if [ $? -gt 16 ]; then
> + echo >&2 "*** ERROR: DWARF compression failed"
> + exit 3
> + fi
> else
> echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"
> exit 2
>
More information about the Debugedit
mailing list