Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Paul N. Hilfinger" <hilfingr@otisco.mckusick.com>
To: ac131313@redhat.com
Cc: gdb@sources.redhat.com
Subject: Re: Frame handling
Date: Thu, 03 Jul 2003 09:05:00 -0000	[thread overview]
Message-ID: <200307030905.h6395AZ04889@otisco.McKusick.COM> (raw)
In-Reply-To: <3F01864B.6070403@redhat.com>


[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 <stdio.h>

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));
}


  reply	other threads:[~2003-07-03  9:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-01  5:00 Jafa
2003-07-01 12:45 ` Daniel Jacobowitz
2003-07-01 13:02 ` Andrew Cagney
2003-07-03  9:05   ` Paul N. Hilfinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-01  1:20 Jafa
2003-07-01  3:42 ` Daniel Jacobowitz
2003-07-01  4:18   ` Andrew Cagney
     [not found]   ` <redirect-6800274@silicondust.com>
2003-07-01  5:13     ` Jafa
2003-07-01 12:58       ` Andrew Cagney
2003-07-01 14:09         ` Daniel Jacobowitz
2003-07-01 14:57           ` Andrew Cagney
     [not found]           ` <redirect-6810110@silicondust.com>
2003-07-01 17:00             ` Jafa
     [not found]       ` <redirect-6810084@silicondust.com>
2003-07-01 16:14         ` Jafa
2003-07-01 17:59           ` Andrew Cagney
2003-04-08 18:35 Jafa
2003-04-14  3:43 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307030905.h6395AZ04889@otisco.McKusick.COM \
    --to=hilfingr@otisco.mckusick.com \
    --cc=Hilfinger@otisco.mckusick.com \
    --cc=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox