https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94311
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 Last reconfirmed| |2020-03-25 --- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- I've just tested GCC 9 and current master and it works for me: $ ./install/bin/valgrind -q ~/bin/gcc/bin/gcc --version gcc (GCC) 10.0.1 20200320 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ /install/bin/valgrind -q date Wed 25 Mar 2020 11:43:10 AM CET $ ./install/bin/valgrind /tmp/a.out ==32006== Memcheck, a memory error detector ==32006== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==32006== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==32006== Command: /tmp/a.out ==32006== ==32006== ==32006== Process terminating with default action of signal 6 (SIGABRT): dumping core ==32006== at 0x48BEEA1: raise (raise.c:51) ==32006== by 0x48A853C: abort (abort.c:79) ==32006== by 0x40112D: main (foo.c:6) Here you can see that foo.c:6 is properly read from debuginfo. Note that one can remove -flto-partition=one from CFLAGS. That rapidly speeds up the build.