Non-dwarf blocks detected by valgrind

Tobias Burnus tobias@codesourcery.com
Mon Jan 25 14:40:47 GMT 2021


Hi Thomas,

which binutil version do you have? I am asking because Jakub just
submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-January/564206.html

If that does not help, it might be that valgrind simply does not like
the DWARF which GCC now produces by default.

Defaulting to 4: Well, one way would be to use '4' in "init(5)" of
"gdwarf-" in gcc/common.opt.

Tobias

PS: When checking myself, I did not set LD_LIBRARY_PATH, using the *.so
of the Linux distro; hence, I might have missed the issue you are seeing.

On 25.01.21 15:05, Thomas Koenig via Fortran wrote:
>
> Hi Tobias,
>
>>> Does this constitute a regression?
>>
>>  From your description, yes. Can you give more details how to
>> reproduce it?
>
> $ cat hello.f90
>   print *,"Hello, world!"
> end
> $ valgrind --version
> valgrind-3.15.0
> $ gfortran -g hello.f90
> $ valgrind ./a.out
> [...]
> --4184-- WARNING: Serious error when reading debug info
> --4184-- When reading debug info from
> /home/ig25/lib64/libgfortran.so.5.0.0:
> --4184-- Ignoring non-Dwarf2/3/4 block in .debug_info
> --4184-- WARNING: Serious error when reading debug info
> --4184-- When reading debug info from
> /home/ig25/lib64/libgfortran.so.5.0.0:
>
> [...]
>
> --4184-- WARNING: Serious error when reading debug info
> --4184-- When reading debug info from /home/ig25/lib64/libgcc_s.so.1:
> --4184-- Ignoring non-Dwarf2/3/4 block in .debug_info
>
>
> [...]
>
> --4184-- WARNING: Serious error when reading debug info
> --4184-- When reading debug info from
> /home/ig25/lib64/libquadmath.so.0.0.0:
> --4184-- Ignoring non-Dwarf2/3/4 block in .debug_info
>
> So, the problem (at least for me) is that libgfortran and
> other libraries are built in a format that valgrind can not
> understand, so it becomes much harder to debug libgfortran :-(
>
> Is there a way to configure the build so that the old debug
> format is used for the libraries?
>
> Best regards
>
>     Thomas
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter


More information about the Gcc mailing list