[rfa:ppc] Make empty registers empty

Andrew Cagney ac131313@redhat.com
Sat Jun 21 01:31:00 GMT 2003


Hello,

The PPC, for some processor variants, has an empty register R0:

#define R0              { 0, 0, 0, 0, 0 }
/* UISA-level SPRs for PowerPC without floating point support.  */
#define PPC_UISA_NOFP_SPRS \
   /* 66 */ R4(cr),  R(lr), R(ctr), R4(xer), R0
/* Motorola e500.  */
static const struct reg registers_e500[] =
{
   R(pc), R(ps),
   /* cr, lr, ctr, xer, "" */
   PPC_UISA_NOFP_SPRS,
   ...
}

The problem is that register_virtual_type for those registers returns 
int32 and, when things are added up, that doesn't agree with 
register_raw_size (aka regsize), et.al.  This makes regcache.[hc] grumpy 
(try 'set architecture powerpc:e500 :-).

The attached adds an empty integer type (for want of a better choice) 
and then modifies register_virtual_type so that it is returned when the 
register is zero.

With this in place it becomes possible (well in theory) to delete all 
the deprecated register * methods.

Ok? GDB 6 branch?

Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20030621/16e96897/attachment.ksh>


More information about the Gdb-patches mailing list