This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb 6.3 segfault at stack.c:294


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]