From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20892 invoked by alias); 6 Jun 2005 13:53:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20840 invoked by uid 22791); 6 Jun 2005 13:53:45 -0000 Received: from unknown-1-11.windriver.com (HELO mail.wrs.com) (147.11.1.11) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 06 Jun 2005 13:53:44 +0000 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.9.3/8.9.1) with ESMTP id GAA05765; Mon, 6 Jun 2005 06:52:31 -0700 (PDT) Received: from lul-mail03.corp.ad.wrs.com ([147.11.74.23]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 6 Jun 2005 06:52:32 -0700 Received: from [147.11.80.21] ([147.11.80.21]) by lul-mail03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.0); Mon, 6 Jun 2005 15:52:29 +0200 Message-ID: <42A4551C.5090107@windriver.com> Date: Mon, 06 Jun 2005 13:53:00 -0000 From: Vincent Rubiolo User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: Joost VandeVondele CC: gdb@sources.redhat.com Subject: Re: gdb 6.3 segfault at stack.c:294 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg00044.txt.bz2 Hello, Something that the gdb maintaniers would welcome is a stack trace of the faulting gdb. To do that, rebuild gdb with debugging enabled (very easy, juste download, configure and make/make install) and when it crashes, issue the following at the other gdb prompt: (gdb) bt This will give more information on the faulty piece of code to the developers. HTH, Vincent Joost VandeVondele wrote: > Hi, > > trying to debug a segfault in my program, gdb segfaults as well. I'm > wondering if this is a known issue. This is what I'm using: > > GNU gdb 6.3 > configured as "i686-pc-linux-gnu" > uname -a > Linux vinegar 2.6.8-24.11-smp #1 SMP Fri Jan 14 13:01:26 UTC 2005 i686 > i686 i386 GNU/Linux > gcc -v > Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.4/specs > Configured with: ../configure --enable-threads=posix --prefix=/usr > --with-local-prefix=/usr/local --infodir=/usr/share/info > --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada > --disable-checking --libdir=/usr/lib --enable-libgcj > --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib > --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux > Thread model: posix > gcc version 3.3.4 (pre 3.3.5 20040809) > > The executable is a fortran based one, compiled using NAG's f95 (which > uses gcc to generate code AFAIK). > > The only real info I have right now is what I get running gdb through > gdb on the segfaulting executable: > > ------------------------------------------ > QS/regtest> gdb gdb > GNU gdb 6.3 > Copyright 2004 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"...Using host libthread_db > library "/lib/tls/libthread_db.so.1". > > (gdb) run ../../../exe/Linux-i686-nag/cp2k.sdbg > Starting program: /home/vondele/bin/gdb > ../../../exe/Linux-i686-nag/cp2k.sdbg > GNU gdb 6.3 > Copyright 2004 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"...Using host libthread_db > library "/lib/tls/libthread_db.so.1". > > (gdb) c > The program is not being run. > (gdb) run > Starting program: /data1/vondele/dev/cp2k/exe/Linux-i686-nag/cp2k.sdbg > Detaching after fork from child process 31218. > Detaching after fork from child process 31230. > @ has created process number 0 0 > > **** **** ****** ** PROGRAM STARTED AT 20050606 > 141655.015 > ***** ** *** *** ** PROGRAM STARTED ON > ** **** ****** PROGRAM STARTED BY > ***** ** ** ** ** PROGRAM PROCESS ID 0 > **** ** ******* ** PROGRAM STARTED IN ./ > > CP2K| Program compiled at Mon Jun 6 09:09:00 > BST 2005 > CP2K| Program compiled on vinegar > CP2K| Program compiled for Linux-i686-nag > CP2K| Last CVS entry message_passing.F/1.50/Mon Jun 6 > 06:44:18 2005 > > ===== Routine Calling Stack ===== > > 1 CP2K > > Program received signal SIGSEGV, Segmentation fault. > 0x0917ad8d in input_section_types_MP_section_vals_add_values > (section_vals_=0x4088b138, > > _input_section_types_section_vals_add_values_section_vals_map_=0x4088b13c, > error_=0xbfffa150, > > Program received signal SIGSEGV, Segmentation fault. > print_frame_args (func=Variable "func" is not available. > ) at stack.c:294 > 294 if (SYMBOL_CLASS (nsym) == LOC_REGISTER) > (gdb) list > 289 { > 290 struct symbol *nsym; > 291 nsym = lookup_symbol > 292 (DEPRECATED_SYMBOL_NAME (sym), > 293 b, VAR_DOMAIN, (int *) NULL, (struct symtab **) > NULL); > 294 if (SYMBOL_CLASS (nsym) == LOC_REGISTER) > 295 { > 296 /* There is a LOC_ARG/LOC_REGISTER pair. This > means that > 297 it was passed on the stack and loaded into > a register, > 298 or passed in a register and stored in a > stack slot. > > ------------------------------------------ > > I can provide the executable that causes this, but it's quite large > (122Mb). I can also try to get some more info locally first, but I'm not > a very experienced gdb user. > > Thanks in advance, > > Joost -- Using Firefox and Thunderbird at Wind River: http://twiki.wrs.com/do/view/ENGtools/MozillaAtWindriver