This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: backtrace/1476: Empty stack.
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 8 Dec 2003 11:48:01 -0000
- Subject: Re: backtrace/1476: Empty stack.
- Reply-to: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
The following reply was made to PR backtrace/1476; it has been noted by GNATS.
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: chastain@sourceware.org, gdb-prs@sources.redhat.com,
gdb-gnats@sources.redhat.com
Cc: skarab@kemsu.ru, kettenis@gnu.org
Subject: Re: backtrace/1476: Empty stack.
Date: Mon, 8 Dec 2003 12:40:38 MET
I strongly suspect that this is caused by a zero function pointer call,
and the example below indeed shows a regression with backtracing from
zero function pointer calls between gdb-5.3 and gdb-6.0.
I am not familiar enough with the new frame code to propose a fix though,
sorry.
pes@xxxx_7$ cat zerofun.c
void x()
{
void (*fp)() = 0;
fp();
}
int
main()
{
x();
return 0;
}
pes@xxxx_8$ gcc -g zerofun.c
pes@xxxx_9$ gdb-5.3 a.out
GNU gdb 5.3
Copyright 2002 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) r
Starting program: ..../a.out
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x08048306 in x () at zerofun.c:4
#2 0x0804831d in main () at zerofun.c:9
#3 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) q
The program is running. Exit anyway? (y or n) y
pes@xxxx_10$ gdb-6.0 a.out
GNU gdb 6.0
Copyright 2003 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) r
Starting program: ..../a.out
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
(gdb) q
The program is running. Exit anyway? (y or n) y
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de