Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Richard.Earnshaw@arm.com
Cc: gdb@sources.redhat.com
Subject: Re: ARM and virtual/raw registers
Date: Sat, 11 May 2002 13:36:00 -0000	[thread overview]
Message-ID: <3CDD80C4.8090603@cygnus.com> (raw)
In-Reply-To: <200205111841.TAA29351@cam-mail2.cambridge.arm.com>

> 
> Argh!  I've just come across another nasty gotcha in this code, if I try 
> to make it so that the regcache does not hold any pseudos:  There's an 
> implicit assumption that all the physical registers will preceed the 
> pseudo registers.

I should have warned you to not go looking under rocks :-(

I think the real issue on this one is that the pseudo-registers and raw 
registers currently occupy the same register number space.  If there was 
clear separation then it would be clear how many of these problems 
should be handled - you couldn't for instance try to put a pseudo in the 
middle of the raw part of the register buffer.

I think it was mentioned, when adding register_{read,write} that this 
was likely to be sufficient rope to ....

See also gdb/122.

> This is a major problem when I want to implement the banked registers for 
> the ARM, since then r8 through r14 (which must have regnums 8 through 14 
> for stabs debug info to work correctly), need to be pseudo registers (they 
> must access the correct physical register for the current processor mode); 
> which means they must appear in the middle of the register range.

Make these pseudo registers (the corresponding real register_name() 
return ""), map stabs_regnum onto that and then (for all raw registers) 
use register register_{read,write} map onto the correct raw register.

You'll also need to tweak saved_regs[] to set the pseudo and not the 
real register address.

Even consider making everything a pseudo so that you know exactly what 
you have at any stage.

> I can make my arm_register_read function correctly remap the register 
> numbers, but then I run into the problem that REGISTER_RAW_SIZE is used 
> both above and below the regcache.

I don't understand why this is a problem.  I think a register (pseudo or 
raw) should have only one size (c.f. my register_size() patch).

Andrew



  reply	other threads:[~2002-05-11 20:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-09  7:31 Richard Earnshaw
2002-05-09  9:45 ` Andrew Cagney
2002-05-09 10:01   ` Richard Earnshaw
2002-05-09 11:52     ` Andrew Cagney
2002-05-10  3:45       ` Richard Earnshaw
2002-05-10  7:48         ` Andrew Cagney
2002-05-10 12:07           ` Andrew Cagney
2002-05-11  7:05             ` Richard Earnshaw
2002-05-11 14:52               ` Andrew Cagney
2002-05-12  7:20                 ` Richard Earnshaw
2002-05-12  8:25                   ` Andrew Cagney
2002-05-12  8:30                     ` Richard Earnshaw
2002-05-12  8:51                       ` Andrew Cagney
2002-05-10  9:29       ` Richard Earnshaw
2002-05-10 11:42         ` Andrew Cagney
2002-05-11  6:16           ` Richard Earnshaw
2002-05-11 11:41           ` Richard Earnshaw
2002-05-11 13:36             ` Andrew Cagney [this message]
2002-05-12  7:11               ` Richard Earnshaw
2002-05-12  7:40                 ` Richard Earnshaw
2002-05-12  9:03                   ` Andrew Cagney
2002-05-12 11:31                     ` Andrew Cagney
2002-05-12  8:07                 ` Andrew Cagney
2002-05-12  8:25                   ` Richard Earnshaw
2002-05-12  8:41                     ` Andrew Cagney
2002-05-13  5:35                   ` Richard Earnshaw
2002-05-13  6:13                     ` Andrew Cagney
2002-05-13  6:18                       ` Richard Earnshaw
2002-05-09 10:08 ` Andrew Cagney
2002-05-09 10:36   ` Richard Earnshaw

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=3CDD80C4.8090603@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=Richard.Earnshaw@arm.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