|
From: | Andrew Gaylard |
Subject: | Re: Segfaults in ddd |
Date: | Wed, 10 May 2006 19:10:28 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060503 |
Fred Krogh wrote:
Raimondo Giammanco wrote:I have installed on gentoo both lesstif and openmotif, but ddd-3.3.11 has been built against openmotif-2.2.3-r9, and it works without problems. It seems a specific gentoo installation issue, rather than a ddd problem.I posted this once before, but I'd love to know if the segfaults I'm getting are specific to my installation or are due to a problem in ddd. I too am running a gentoo system and have tried both openmotif and lesstif. Both work fine except as illustrated by the following Fortran code c Program to show problem in ddd integer I, IA(5) call sub1(IA) print *, (IA(I), I = 1, 5) stop end subroutine sub1(II) integer I, II(*) do 10 I = 1, 5 II(I) = I 10 continue return end ------------------------------------------------------------------------ Paste this into your editor, call the file say test.f and save it. g77 -g -o test test.f ddd test Set a breakpoint at line 12 (two lines from the bottom) and run the program. Then move the mouse pointer over II. This kills ddd for me. Is it just me?? Thanks, Fred Hello Fred, I have a different problem. This code kills my gdb, not ddd. Since this is the most Fortran I've ever done, I don't know whether I'm doing something stupid here... Here's the transcript: address@hidden ~/tmp $ gdb GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". (gdb) file t Reading symbols from /home/gaylard_a/tmp/t...done. Using host libthread_db library "/lib/libthread_db.so.1". (gdb) b 1 Breakpoint 1 at 0x8048620: file /var/tmp/portage/glibc-2.3.6-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S, line 1. (gdb) b t.f:1 Breakpoint 2 at 0x80486b4: file t.f, line 1. (gdb) d 1 (gdb) list 1 /var/tmp/portage/glibc-2.3.6-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S: No such file or directory. in /var/tmp/portage/glibc-2.3.6-r3/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S (gdb) r Starting program: /home/gaylard_a/tmp/t Breakpoint 2, MAIN__ () at t.f:2 2 integer I, IA(5) Current language: auto; currently fortran (gdb) list 1 c Program to show problem in ddd 2 integer I, IA(5) 3 call sub1(IA) 4 print *, (IA(I), I = 1, 5) 5 stop 6 end 7 subroutine sub1(II) 8 integer I, II(*) 9 do 10 I = 1, 5 10 II(I) = I (gdb) 11 10 continue 12 return 13 end (gdb) b 11 Breakpoint 3 at 0x8048761: file t.f, line 11. (gdb) c Continuing. Breakpoint 3, sub1_ (ii=0xbfca0ae0) at t.f:11 11 10 continue (gdb) p II $1 = (PTR TO -> ( integer (-1))) 0xbfca0ae0 (gdb) output *II 1 2 3 4 5 Segmentation fault address@hidden ~/tmp $ |
[Prev in Thread] | Current Thread | [Next in Thread] |