This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: ARM frame fp is not always FP_REGNUM
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: ARM frame fp is not always FP_REGNUM
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Tue, 04 Jul 2000 08:55:11 -0700
- CC: Alexandre Oliva <aoliva at redhat dot com>, gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <orn1jyfpso.fsf@guarana.lsd.ic.unicamp.br> <39617827.29D15730@cygnus.com>
- Reply-To: msnyder at cygnus dot com
Andrew Cagney wrote:
>
> Alexandre Oliva wrote:
> >
> > read_relative_register_raw_bytes_for_frame() would optimize access to
> > FP_REGNUM by not re-reading it when the value of FP is already known.
> > However, because FP is not always available, sometimes the value of SP
> > is stored in the frame structure as the value of FP. In this case,
> > reading the value of FP_REGNUM will get you SP instead of the actual
> > value of the FP register. This patch fixes this bug. Ok to install?
>
> I'm not sure about this.
>
> FP_REGNUM refers to GDB's internal frame-handle / frame-pointer /
> frame-base variable. It doesn't refer to the ISA register that is seen
> in architectures such as ARM or VAX. Unfortunatly, some architectures
> have both and this leads to confusion.
Huh??? FP_REGNUM refers to a register.
The "fp" that is displayed by "info registers" sometimes
refers to gdb's internal pseudo-frame or virtual frame location,
but the constant FP_REGNUM is a real hardware register.
> What exactly is the behavour you're seeing and what behavour are you
> trying to achieve.
>
> Andrew