On Thu, Jul 30, 2020 at 08:37:05AM +0100, Nick Clifton wrote:
Hi Guys,
> But... in 2.35 you can give the DWARF level you want.
> The problem with not supplying -g (or --gdwarf-[VERSION]) is that the
> dwarf_level is never set! And then gas will happily create an
> .debug_info section with DWARF CUs that have a version of zero (!).
Doh!
> This, defaulting to version 4. Fixes it for me:
>
> diff --git a/gas/as.c b/gas/as.c
> index 4c5881abd88..c2da78870ef 100644
> --- a/gas/as.c
> +++ b/gas/as.c
> @@ -103,7 +103,7 @@ int verbose = 0;
> int flag_dwarf_cie_version = -1;
>
> /* The maximum level of DWARF DEBUG information we should manufacture. */
> -unsigned int dwarf_level = 0;
> +unsigned int dwarf_level = 4;
>
> #if defined OBJ_ELF || defined OBJ_MAYBE_ELF
> int flag_use_elf_stt_common = DEFAULT_GENERATE_ELF_STT_COMMON;
I will apply this patch to the rawhide binutils (and the upstream binutils sources).
Thanks Nick - I will test this as soon as I see the binutils
package in Rawhide.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW