This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
backtrace/1574: Stack is not entirely shown (gdb 6.0 C C++ backtrace limit)
- From: cyrille dot benard at elios-informatique dot fr
- To: gdb-gnats at sources dot redhat dot com
- Date: 26 Feb 2004 13:56:07 -0000
- Subject: backtrace/1574: Stack is not entirely shown (gdb 6.0 C C++ backtrace limit)
- Reply-to: cyrille dot benard at elios-informatique dot fr
>Number: 1574
>Category: backtrace
>Synopsis: Stack is not entirely shown (gdb 6.0 C C++ backtrace limit)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 26 13:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Cyrille Bénard
>Release: GNU gdb 6.0
>Organization:
>Environment:
1) SunOS xxxxxx 5.8 Generic_108528-27 sun4u sparc.
2) The GCC used to compile the application I want to debug is version 3.3.2. The GCC version used to compile GDB 6.0 is version 3.1.
3) This GDB was configured as "sparc-sun-solaris2.8"
>Description:
When I set a breakpoint in the f6() function (see the file attachment) if I ask GDB for showing the stack (backtrace),
the stack is not entirely shown. Only 3 frames are displayed :
**********
#0 f6() () at toto.cc:40
#1 0x00010c80 in f5() () at toto.cc:35
#2 0x00010c68 in f4() () at toto.cc:30
**********
When I ask GDB for informations about the backtrace limit it tells me there is no limit (great ^^ ) :
**********
(gdb) show backtrace limit
The upper bound on the number of backtrace levels is unlimited.
**********
When I set this limit to 8 (trying to investigate) and then asked for backtrace, it tells me that the limit exceeded... really ??? which way did you follow GDB ?? ;^) :
**********
Backtrace limit of 8 exceeded
Backtrace limit of 8 exceeded
Breakpoint 1, f6() () at toto.cc:40
40 cout << "In f6 function" << endl ;
(gdb) bt
#0 f6() () at toto.cc:40
Backtrace limit of 8 exceeded
(gdb)
**********
>How-To-Repeat:
compile the attached file :
g++ -Wall -g toto.cc
Load the generated file in gdb 6.0 (file a.out by default) :
gdb a.out
set a breakpoint in f6 function :
br f6
Start the application :
run
When the debugger stop, call the backtrace :
bt
>Fix:
unfortunatly I don't know :(
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="toto.cc"
Content-Disposition: inline; filename="toto.cc"
#include <iostream>
using namespace std ;
void f1(void) ;
void f2(void) ;
void f3(void) ;
void f4(void) ;
void f5(void) ;
void f6(void) ;
void f1(void)
{
f2() ;
}
void f2(void)
{
f3() ;
}
void f3(void)
{
f4() ;
}
void f4(void)
{
f5() ;
}
void f5(void)
{
f6() ;
}
void f6(void)
{
cout << "In f6 function" << endl ;
}
int main(void)
{
f1() ;
return( 0 ) ;
}