Hi all,

I have bug in a C++ constructor for a global variable.

While 4.17 gives some helpfull information - see below.
5.0 does not :

GNU gdb 5.0
Copyright 2000 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 "mips-sgi-irix6.5"...
(gdb) core core
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib32/libm.so...done.
Reading symbols from /usr/lib32/libc.so.1...done.
#0  0x0 in ?? ()
(gdb) where
#0  0x0 in ?? ()
#1  0x1005ce28 in super_real::super_dtoz_exact (this=0xfb5ace4,
    b=1.0609711368872574e-314) at super.C:5654
warning: Warning: GDB can't find the start of the function at
0x7fff2f4c.

    GDB is unable to find the start of the function at 0x7fff2f4c
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x7fff2f4c for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.

----------------------------------------------------------------------

GNU gdb 4.17
Copyright 1998 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 "mips-sgi-irix6.5"...
(gdb) core core
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib32/libm.so...done.
Reading symbols from /usr/lib32/libc.so.1...done.
#0  0x1004bfa8 in super_real_pool_ptr::super_real_pool_ptr
(this=0x7fff2c70)
    at super.C:370
370                     pointer->radix = super_real :: def_radix;
(gdb) where
#0  0x1004bfa8 in super_real_pool_ptr::super_real_pool_ptr
(this=0x7fff2c70)
    at super.C:370
#1  0x1005ce28 in super_real::super_dtoz_exact (this=0x100c50d8,
    b=9.9999999999999998e-13) at super.C:5654
#2  0x1004bd14 in super_real::super_real (this=0x100c50d8,
    d=9.9999999999999998e-13) at super.C:323
#3  0x10032ed0 in __static_initialization_and_destruction_0
(__initialize_p=1,
    __priority=65535) at IGPMatrix_xR.C:1788
#4  0x100393c0 in global constructors keyed to
IGPMatrix::xVector::Dim_default
    () at IGPMatrix_xR.C:450
#5  0x10099aa8 in __do_global_ctors ()
#6  0x10099b0c in __istart ()
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0xfb604a4
This warning occurs if you are debugging a function without any symbols
(for example, in a stripped executable).  In that case, you may wish to
increase the size of the search with the `set heuristic-fence-post'
command.

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.

------------------------------------------

Have I missed something, or is this a bug in 5.0 ?

Thanks for looking into it,
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany


Reply via email to