Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Jerome Guitton <guitton@act-europe.fr>,
	gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com
Subject: Re: [RFA/RFC] ARM : one-line prologue analysis
Date: Fri, 26 Sep 2003 09:33:00 -0000	[thread overview]
Message-ID: <200309260933.h8Q9X7w16542@pc960.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Thu, 25 Sep 2003 17:32:30 EDT." <3F735EEE.3060306@redhat.com>

> >     for (reg = 0; reg < NUM_REGS; reg++)
> > !     if (cache->saved_regs[reg].addr != -1)
> >         cache->saved_regs[reg].addr += cache->prev_sp;
> 
> Would trad_frame_addr_p() be better?
> 
> Andrew
> 
> 

I think so.  However, arm_scan_prologue (which is run just before this 
loop) abuses the .addr field and puts an offset into it.  That offset can 
be (often is) negative at that point; the loop Jerome is fixing is the one 
where that offset is turned back into a real address.

Fortunately, the stack will always be word aligned (your application is 
really broken if it isn't), and registers are always at least four bytes 
in size, so I don't think it's possible for -1 to ever get written in 
there by the code itself.

So approved with Andrew's suggested change.

R.

PS Andrew,

We seem to be horribly overloading and then exposing these special values 
in the trad_frame interface.  Wouldn't it make more sense to add more 
routines to get and update the values, then we can hide the special 
meanings entirely (and maybe even change the way they are recorded if we 
need to).

R.


  reply	other threads:[~2003-09-26  9:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-25 20:45 Jerome Guitton
2003-09-25 21:32 ` Andrew Cagney
2003-09-26  9:33   ` Richard Earnshaw [this message]
2003-09-26 10:17     ` Jerome Guitton
2003-09-26 10:20       ` Richard Earnshaw
2003-09-26 10:25         ` Jerome Guitton
2003-09-27 15:03     ` Andrew Cagney
2003-09-29 13:28 ` [commit] " Jerome Guitton

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=200309260933.h8Q9X7w16542@pc960.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=guitton@act-europe.fr \
    /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