[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #13 from jan dot kratochvil at redhat dot com 2009-02-12 09:35 --- The flat (so far no namespacing) DW_TAG_module support is now in GDB CVS. http://sourceware.org/ml/gdb-cvs/2009-02/msg00073.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #12 from burnus at gcc dot gnu dot org 2009-02-07 20:12 --- Workaround patch for GDB by Jan: http://sourceware.org/ml/gdb-patches/2009-02/msg00177.html GDB currently ignores DW_TAG_module and so the DIEs get completely lost. This patch is not the real Fortran module support - it only merges the namespaces as flat - but it fixes the regression of gfortran-4.4. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #11 from pinskia at gcc dot gnu dot org 2009-02-06 01:23 --- Not a gcc bug so closing as such. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #10 from jv244 at cam dot ac dot uk 2009-02-04 20:53 --- (In reply to comment #9) I hope to patch it soon although I have no such patch right now. Hi Jan, any progress on this one ? I've a core to analyze, but I'm stuck here. Joost -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #1 from jv244 at cam dot ac dot uk 2009-02-02 08:59 --- gfortran -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /data03/vondele/gcc_trunk/gcc/configure --prefix=/data03/vondele/gcc_trunk/build --enable-languages=c,fortran --disable-multilib --with-ppl=/data03/vondele/gcc_trunk/build/ --with-cloog=/data03/vondele/gcc_trunk/build/ Thread model: posix gcc version 4.4.0 20090114 (experimental) [trunk revision 143362] (GCC) -- jv244 at cam dot ac dot uk changed: What|Removed |Added GCC target triplet||x86_64-unknown-linux-gnu Known to fail||4.4.0 Known to work||4.3.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
-- burnus at gcc dot gnu dot org changed: What|Removed |Added CC||burnus at gcc dot gnu dot ||org Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #9 from jan dot kratochvil at redhat dot com 2009-02-02 13:48 --- Confirming it is a GDB bug, DW_TAG_module is completely ignored by dwarf2read.c. Older GCCs did not support module namespaces so it may look as a regression. I hope to patch it soon although I have no such patch right now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
-- jakub at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #2 from burnus at gcc dot gnu dot org 2009-02-02 09:36 --- Jakub, do you have an idea? This might be a side effect of one of your DWARF patches. Reduced test case: module m contains subroutine a() integer :: i do i = 1, 5 if(i == 8) call abort() end do end subroutine a end module m use m call a() end $ gfortran-4.4 -g -O0 aaa.f90 $ gdb --quiet a.out (gdb) b 6 Breakpoint 1 at 0x400704: file aaa.f90, line 6. (gdb) run Starting program: /dev/shm/a.out Breakpoint 1, __m_MOD_a () at aaa.f90:6 6 if(i == 8) call abort() Current language: auto; currently fortran (gdb) p i No symbol i in current context. (gdb) pt i No symbol i in current context. $ gfortran-4.3 -g -O0 aaa.f90 $ gdb --quiet a.out (gdb) b 6 Breakpoint 1 at 0x400701: file aaa.f90, line 6. (gdb) run Starting program: /dev/shm/a.out Breakpoint 1, a () at aaa.f90:6 6 if(i == 8) call abort() Current language: auto; currently fortran (gdb) p i $1 = 1 (gdb) pt i type = integer(kind=4) -- burnus at gcc dot gnu dot org changed: What|Removed |Added CC||jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #5 from jakub at gcc dot gnu dot org 2009-02-02 09:51 --- The generated unwind info looks good to me, so it is likely a gdb issue. [58]module name m decl_file1 decl_line1 sibling [89] [61] subprogram external name a decl_file1 decl_line3 low_pc 0x0040065c __m_MOD_a high_pc 0x00400698 MAIN__ frame_base location list [24] [7b]variable name i decl_file1 decl_line4 type [89] location 2 byte block [ 0] fbreg -20 [89]base_type byte_size4 encoding signed (5) name integer(kind=4) is in the CU (together with MAIN__, but that is not relevant to i in the module function). -- jakub at gcc dot gnu dot org changed: What|Removed |Added CC||jan dot kratochvil at redhat ||dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #4 from jv244 at cam dot ac dot uk 2009-02-02 09:49 --- (In reply to comment #3) thanks for the reduced testcase... will help :-) Hmm, maybe this is only a gdb bug / missing feature. just as a note, I tried gdb 6.8 and it failed as well. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #6 from jv244 at cam dot ac dot uk 2009-02-02 11:09 --- (In reply to comment #5) The generated unwind info looks good to me, so it is likely a gdb issue. 1) how does one get this generated unwind info (I'd like to see what is different from 4.3)? 2) Do you see a way to work around this issue (other than using idb), since this impacts the debugability of Fortran code significantly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #8 from jv244 at cam dot ac dot uk 2009-02-02 12:14 --- (In reply to comment #7) 2) report this to gdb and help them fix it. OK, I've at least been able to add a PR for this in the gdb bugzilla: http://sourceware.org/bugzilla/show_bug.cgi?id=9806 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #3 from burnus at gcc dot gnu dot org 2009-02-02 09:45 --- Hmm, maybe this is only a gdb bug / missing feature. $ gfortran-4.4 -O0 -g aaa.f90 $ idbc a.out Intel(R) Debugger for applications running on Intel(R) 64, Version 11.1 Beta, Build [1.2097.2.21] [...] (idb) b 6 Breakpoint 1 at 0x4006e4: file /dev/shm/aaa.f90, line 6. (idb) run [...] 6 if(i == 8) call abort() (idb) pt i type = INTEGER(4) (idb) p i $1 = 1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073
[Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
--- Comment #7 from jakub at gcc dot gnu dot org 2009-02-02 11:57 --- 1) eu-readelf -w info. If you don't have elfutils, binutils readelf -wi generates similar output, though without the indentation, so it is harder to find out the parent/child/sibling relation between consecutive DIEs. 2) report this to gdb and help them fix it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073