Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Nov 2021 10:42:12 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: ctfconvert: rc = 1 Unsupported version [_dwarf_info_load(229)]
Message-ID:  <da801e7b-a32b-e43e-cd2d-da796055aff2@FreeBSD.org>
In-Reply-To: <YaE584vhhhepxuUW@nuc>
References:  <cba74929-19d6-3d29-6288-feeef3127577@FreeBSD.org> <YaEF8VJWht%2BFcI1t@nuc> <e5cbcdd8-ea9e-fe60-4c0b-7b02882d6689@FreeBSD.org> <YaEuyyr5mQoroMiE@nuc> <YaE584vhhhepxuUW@nuc>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26/11/2021 21:48, Mark Johnston wrote:
> On Fri, Nov 26, 2021 at 02:00:27PM -0500, Mark Johnston wrote:
>> Thanks, I can reproduce it now.
>>
>> Our libdwarf is complaining that the first compilation unit header in
>> .debug_info contains an unsupported DWARF version number (libdwarf only
>> supports 2, 3 and 4).  In files compiled by clang it ends up being zero.
>> For instance, compiling bin/cat and dumping the .debug_info section:
>>
>> gcc10:
>>   c1250000 04000000 00000801 00000000
>>             ^ DWARF version
>> clang:
>>    01000000 00000000 4e230000 00000000
>>
>> llvm-dwarfdump and binutils readelf are somehow still able to find a
>> valid-looking unit header, but I haven't yet been able to figure out how
>> they do that from reading the DWARF 4/5 specs or the LLVM sources.
> |Ah, we recently started configuring clang to compress debug sections by 
> default, and our libdwarf doesn't know how to handle that. As an interim 
> workaround this could simply be disabled with WITH_CTF is configured:

Oh wow, you were very fast at figuring this out.
Thank you very much!

I'll give the build change a whirl first and then test D33139 a bit later.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?da801e7b-a32b-e43e-cd2d-da796055aff2>