public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/39073]  New: [4.4 Regression] unable to debug CP2K (no local symbols)
@ 2009-02-02  8:58 jv244 at cam dot ac dot uk
  2009-02-02  8:59 ` [Bug debug/39073] " jv244 at cam dot ac dot uk
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-02-02  8:58 UTC (permalink / raw)
  To: gcc-bugs

I find that I can not print local variables (none that is) if I use 4.4 for
compiling CP2K, while it goes fine with 4.3.

Reproducing requires these steps:

wget http://www.pci.uzh.ch/vandevondele/tmp/CP2K_2008_12_03.tgz
tar -xzvf CP2K_2008_12_03.tgz
cd CP2K_2008_12_03/
#
# change FCFLAGS to read
# FCFLAGS = -O0 -g
# be sure lapack/blas are available for linking 
# 
vi Makefile 
make
gdb ./cp2k.sopt
(gdb) run test.inp
^C
Program received signal SIGINT, Interrupt.
0x00000000006bb92a in __distribution_optimize_MOD_update_cost_cpu_diff () at
distribution_optimize.F:361
361            IF (local_cols_new(i).NE.local_cols_old(i)) THEN
(gdb) print i
No symbol "i" in current context.
(gdb) info locals
No locals.

wherever one breaks, local symbols can not be found. The same goes fine using
4.3.1


-- 
           Summary: [4.4 Regression] unable to debug CP2K (no local symbols)
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
@ 2009-02-02  8:59 ` jv244 at cam dot ac dot uk
  2009-02-02  9:26 ` burnus at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-02-02  8:59 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
  2009-02-02  8:59 ` [Bug debug/39073] " jv244 at cam dot ac dot uk
@ 2009-02-02  9:26 ` burnus at gcc dot gnu dot org
  2009-02-02  9:36 ` burnus at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-02-02  9:26 UTC (permalink / raw)
  To: gcc-bugs



-- 

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
  2009-02-02  8:59 ` [Bug debug/39073] " jv244 at cam dot ac dot uk
  2009-02-02  9:26 ` burnus at gcc dot gnu dot org
@ 2009-02-02  9:36 ` burnus at gcc dot gnu dot org
  2009-02-02  9:45 ` burnus at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-02-02  9:36 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2009-02-02  9:36 ` burnus at gcc dot gnu dot org
@ 2009-02-02  9:45 ` burnus at gcc dot gnu dot org
  2009-02-02  9:49 ` jv244 at cam dot ac dot uk
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-02-02  9:45 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2009-02-02  9:45 ` burnus at gcc dot gnu dot org
@ 2009-02-02  9:49 ` jv244 at cam dot ac dot uk
  2009-02-02  9:51 ` jakub at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-02-02  9:49 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2009-02-02  9:49 ` jv244 at cam dot ac dot uk
@ 2009-02-02  9:51 ` jakub at gcc dot gnu dot org
  2009-02-02 10:53 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-02-02  9:51 UTC (permalink / raw)
  To: gcc-bugs



------- 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_file            1
             decl_line            1
             sibling              [    89]
 [    61]      subprogram
               external             
               name                 "a"
               decl_file            1
               decl_line            3
               low_pc               0x000000000040065c <__m_MOD_a>
               high_pc              0x0000000000400698 <MAIN__>
               frame_base           location list [    24]
 [    7b]        variable
                 name                 "i"
                 decl_file            1
                 decl_line            4
                 type                 [    89]
                 location             2 byte block
                  [   0] fbreg -20
 [    89]    base_type
             byte_size            4
             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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2009-02-02  9:51 ` jakub at gcc dot gnu dot org
@ 2009-02-02 10:53 ` jakub at gcc dot gnu dot org
  2009-02-02 11:10 ` jv244 at cam dot ac dot uk
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-02-02 10:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39073


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (6 preceding siblings ...)
  2009-02-02 10:53 ` jakub at gcc dot gnu dot org
@ 2009-02-02 11:10 ` jv244 at cam dot ac dot uk
  2009-02-02 11:57 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-02-02 11:10 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (7 preceding siblings ...)
  2009-02-02 11:10 ` jv244 at cam dot ac dot uk
@ 2009-02-02 11:57 ` jakub at gcc dot gnu dot org
  2009-02-02 12:14 ` jv244 at cam dot ac dot uk
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-02-02 11:57 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (8 preceding siblings ...)
  2009-02-02 11:57 ` jakub at gcc dot gnu dot org
@ 2009-02-02 12:14 ` jv244 at cam dot ac dot uk
  2009-02-02 13:48 ` jan dot kratochvil at redhat dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-02-02 12:14 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (9 preceding siblings ...)
  2009-02-02 12:14 ` jv244 at cam dot ac dot uk
@ 2009-02-02 13:48 ` jan dot kratochvil at redhat dot com
  2009-02-04 20:53 ` jv244 at cam dot ac dot uk
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-02-02 13:48 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (10 preceding siblings ...)
  2009-02-02 13:48 ` jan dot kratochvil at redhat dot com
@ 2009-02-04 20:53 ` jv244 at cam dot ac dot uk
  2009-02-06  1:23 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-02-04 20:53 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (11 preceding siblings ...)
  2009-02-04 20:53 ` jv244 at cam dot ac dot uk
@ 2009-02-06  1:23 ` pinskia at gcc dot gnu dot org
  2009-02-07 20:12 ` burnus at gcc dot gnu dot org
  2009-02-12  9:35 ` jan dot kratochvil at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-06  1:23 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (12 preceding siblings ...)
  2009-02-06  1:23 ` pinskia at gcc dot gnu dot org
@ 2009-02-07 20:12 ` burnus at gcc dot gnu dot org
  2009-02-12  9:35 ` jan dot kratochvil at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-02-07 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug debug/39073] [4.4 Regression] unable to debug CP2K (no local symbols)
  2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
                   ` (13 preceding siblings ...)
  2009-02-07 20:12 ` burnus at gcc dot gnu dot org
@ 2009-02-12  9:35 ` jan dot kratochvil at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-02-12  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-02-12  9:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-02  8:58 [Bug debug/39073] New: [4.4 Regression] unable to debug CP2K (no local symbols) jv244 at cam dot ac dot uk
2009-02-02  8:59 ` [Bug debug/39073] " jv244 at cam dot ac dot uk
2009-02-02  9:26 ` burnus at gcc dot gnu dot org
2009-02-02  9:36 ` burnus at gcc dot gnu dot org
2009-02-02  9:45 ` burnus at gcc dot gnu dot org
2009-02-02  9:49 ` jv244 at cam dot ac dot uk
2009-02-02  9:51 ` jakub at gcc dot gnu dot org
2009-02-02 10:53 ` jakub at gcc dot gnu dot org
2009-02-02 11:10 ` jv244 at cam dot ac dot uk
2009-02-02 11:57 ` jakub at gcc dot gnu dot org
2009-02-02 12:14 ` jv244 at cam dot ac dot uk
2009-02-02 13:48 ` jan dot kratochvil at redhat dot com
2009-02-04 20:53 ` jv244 at cam dot ac dot uk
2009-02-06  1:23 ` pinskia at gcc dot gnu dot org
2009-02-07 20:12 ` burnus at gcc dot gnu dot org
2009-02-12  9:35 ` jan dot kratochvil at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).