From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26159 invoked by alias); 3 Jul 2003 09:05:18 -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 26140 invoked from network); 3 Jul 2003 09:05:15 -0000 Received: from unknown (HELO otisco.McKusick.COM) (209.31.233.190) by sources.redhat.com with SMTP; 3 Jul 2003 09:05:15 -0000 Received: (from hilfingr@localhost) by otisco.McKusick.COM (8.11.6/8.11.6) id h6395AZ04889; Thu, 3 Jul 2003 02:05:10 -0700 Date: Thu, 03 Jul 2003 09:05:00 -0000 Message-Id: <200307030905.h6395AZ04889@otisco.McKusick.COM> From: "Paul N. Hilfinger" To: ac131313@redhat.com CC: gdb@sources.redhat.com Subject: Re: Frame handling Reply-to: Hilfinger@otisco.mckusick.com References: <00cd01c33f8d$b4e570e0$0a00a8c0@nkelseyhome> <3F01864B.6070403@redhat.com> X-SW-Source: 2003-07/txt/msg00058.txt.bz2 [Apologies if I've missed a message on this]. Something (recent frame stuff?) seems to have broken backtraces on Sparc Solaris 5.8. Use the head version of GDB (although the GDB6 branch shows it also) on the attached silly program (I compiled with -g and gcc 3.0.3). If you stop in, say, inside the first recursive invocation of g, you will find that 'where' only prints three frames, getting the frame pointer screwed up in the last one, as far as I can tell. Paul Hilfinger ------------------------------------------------------------ #include extern int g (int); int h (int r) { int i; int s; for (i = r-1, s = 0; i >= 0; i -= 1) s += g (i); return s; } int g (int q) { return h (q); } int f (int x, int y) { int z, s; for (z = x, s = 0; z < y; z += 1) s += z * g(x); return s; } main () { printf ("%d\n", f (3, 7)); }