Greatly increased GDB memory and CPU usage with newest embedded ARM toolchain

R. Diez rdiezmail-binutils@yahoo.de
Sun Apr 18 08:16:25 GMT 2021


>> The debug information is not compressed.
> 
> How are you determining that ^ ?
> 
> (I ask, because historically compressed debug info was opt-in and used
> a section name mangling (.zdebug_*) to notate compressed debug
> sections - but recent versions of GCC have started compressing by
> default and using an ELF section flag (SHF_COMPRESSED) without section
> name mangling (so dumping section names would not be enough to
> determine whether compressed debug info was used)


I do not know about SHF_COMPRESSED.

I checked with:

$ ./arm-none-eabi-ld --help

[...]
--compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]
     Compress DWARF debug sections using zlib
     Default: none
[...]


I did not quite trust the "Default: none" statement, so I tested in the past by passing the following flag:

-Wl,--compress-debug-sections=zlib

And the resulting elf file was less than half the size.

That is how I assume that the debug information is not being compressed.

I am not compressing because for such a little project it is not worth it.

Regards,
   rdiez


More information about the Gdb mailing list