This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: ARM and virtual/raw registers
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 09 May 2002 12:45:54 -0400
- Subject: Re: ARM and virtual/raw registers
- References: <200205091431.PAA15329@cam-mail2.cambridge.arm.com>
> In addition to the above, we also have the case of the CPSR register. On
> old ARM chips (or on non-thumb chips up to armv4), this register is, or
> can be mimicked as being, part of the PC. This suggests to me that the
> current decoding shenanigans that are currently hidden in some of the
> back-end code should probably be moved into the virtual-raw conversion
> layer. That is, register_convirt_{to,from}_virtual(CPSR) (or whatever
> it's really called) should be responsible for the updating of raw-PC or
> raw-CPSR as appropriate.
Hmm, what exactly do you mean by mimicked? Can the entire register
contents be constructed from information found in the other raw/hardware
registers? If that is the case then making it a pseudo-register and
using register_{read,write} should do the trick.
(notice - convert-to-virtual free zone).
enjoy,
Andrew