Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: ARM frame fp is not always FP_REGNUM
Date: Tue, 04 Jul 2000 00:29:00 -0000	[thread overview]
Message-ID: <39619215.E49230D9@cygnus.com> (raw)
In-Reply-To: <or1z1afnle.fsf@guarana.lsd.ic.unicamp.br>

Alexandre Oliva wrote:
> 
> On Jul  4, 2000, Andrew Cagney <ac131313@cygnus.com> wrote:
> 
> > FP_REGNUM refers to GDB's internal frame-handle / frame-pointer /
> > frame-base variable.
> 
> On ARM, it's register 11, which is a real register.  But SP_REGNUM is
> register 13.  Then, when framereg == 13 in EXTRA_FRAME_INFO, `info
> regs' will display the value of r13 for r11, and the actual value of
> r11 cannot be obtained.

How does this compare to when you do an info registers when at the inner
most frame?

Hmm, I remember reading something about this in the doco recently. 
Check:

http://sourceware.cygnus.com/gdb/onlinedocs/gdb_9.html#SEC60
@value{GDBN} has four ``standard'' register names that are available (in
expressions) on most machines---whenever they do not conflict with an
architecture's canonical mnemonics for registers.  The register names
@code{$pc} and @code{$sp} are used for the program counter register and
the stack pointer.  @code{$fp} is used for a register that contains a
pointer to the current stack frame, and @code{$ps} is used for a
register that contains the processor status.  For example,
you could print the program counter in hex with


This suggests that providing the ``$fp'' pseudo register is wrong for
this target.

	Andrew
From ac131313@cygnus.com Tue Jul 04 00:31:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: StrongARM: str stores different PC
Date: Tue, 04 Jul 2000 00:31:00 -0000
Message-id: <39619281.DDECCB6C@cygnus.com>
References: <or3dlqe54f.fsf@guarana.lsd.ic.unicamp.br>
X-SW-Source: 2000-07/msg00031.html
Content-length: 72

Just one BTW, use sim_io_eprintf (....) for the error/warning.

	Andrew
From aoliva@redhat.com Tue Jul 04 00:44:00 2000
From: Alexandre Oliva <aoliva@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: ARM frame fp is not always FP_REGNUM
Date: Tue, 04 Jul 2000 00:44:00 -0000
Message-id: <oru2e6cpaz.fsf@guarana.lsd.ic.unicamp.br>
References: <orn1jyfpso.fsf@guarana.lsd.ic.unicamp.br> <39617827.29D15730@cygnus.com> <or1z1afnle.fsf@guarana.lsd.ic.unicamp.br> <39619215.E49230D9@cygnus.com>
X-SW-Source: 2000-07/msg00032.html
Content-length: 1173

On Jul  4, 2000, Andrew Cagney <ac131313@cygnus.com> wrote:

> Alexandre Oliva wrote:

>> On ARM, it's register 11, which is a real register.  But SP_REGNUM is
>> register 13.  Then, when framereg == 13 in EXTRA_FRAME_INFO, `info
>> regs' will display the value of r13 for r11, and the actual value of
>> r11 cannot be obtained.

> How does this compare to when you do an info registers when at the inner
> most frame?

That's exactly the case.

Given this sample assembly program:

	.global _start
_start:
	mov	r11, #1

After executing the first instruction, GDB will print:

(gdb) info reg
[...]
r11            0x800    2048
r12            0x0      0
sp             0x800    2048
[...]
(gdb) p $fp
$1 = 1

> This suggests that providing the ``$fp'' pseudo register is wrong for
> this target.

Or that, on ARM, $fp should obtain the value of frame->framereg,
instead of FP_REGNUM.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


  parent reply	other threads:[~2000-07-04  0:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <orn1jyfpso.fsf@guarana.lsd.ic.unicamp.br>
2000-07-03 22:39 ` Andrew Cagney
     [not found]   ` <or1z1afnle.fsf@guarana.lsd.ic.unicamp.br>
2000-07-04  0:29     ` Andrew Cagney [this message]
     [not found]       ` <oru2e6cpaz.fsf@guarana.lsd.ic.unicamp.br>
2000-07-04  1:09         ` Andrew Cagney
2000-07-04  8:56   ` Michael Snyder

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=39619215.E49230D9@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=aoliva@redhat.com \
    --cc=gdb-patches@sourceware.cygnus.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