public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Jan Hoogerbrugge <hoogerbrugge@hotmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: frameless functions
Date: Tue, 04 Mar 2003 17:58:00 -0000	[thread overview]
Message-ID: <3E64E936.6070603@redhat.com> (raw)
In-Reply-To: <F32es8JynCR34XtFT0D000255aa@hotmail.com>

> Hi,
> 
> I porting gdb to a new target. The port is now in a stage where stack traces seem to work when code is compiled with a frame pointer. Now I am trying to get it working for code without a frame pointer. Could anyone tell me how to deal with frameless functions? Is there another port where I can learn from?
> 
> My compiler assigns the incoming sp to the fp. I guess this is what most compilers do.
> 
> In scan_prologue() I use fi->frame, which appears to correspond to the fp, to determine where registers are saved. What to do in the case of frameless functions? Should I assign something to fi->frame?
> 
> Should I define frameless_function_invocation()?

I'd ignore that method, it doesn't do much useful.  You'll need to do at 
least a minimal prologue analysis to determine the address of the 
frameless frames `base'.  You need to do this anyway to determine where 
any pushed registers are.

As an alternative, your architecure might have debug info that lets you 
locate the frame base.

I should also note that the frame code is being rewritten so when it 
comes to integrate your architecture into GDB, you're going to encounter 
some radical change.

Andrew


      reply	other threads:[~2003-03-04 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-04 15:46 Jan Hoogerbrugge
2003-03-04 17:58 ` Andrew Cagney [this message]

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=3E64E936.6070603@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=hoogerbrugge@hotmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).