int base_regnum; int offset = 0; char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch *regcache_arch = get_regcache_arch (regcache);
e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,			   int reg_nr, void *buffer){  int base_regnum;  int offset = 0;  char temp_buffer[MAX_REGISTER_SIZE];  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);   if (reg_nr >= tdep->ppc_gp0_regnum       && reg_nr <= tdep->ppc_gplast_regnum)    {      base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;      /* Build the value in the provided buffer.  */       /* Read the raw register of which this one is the lower portion.  */      regcache_raw_read (regcache, base_regnum, temp_buffer);      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)	offset = 4;      memcpy ((char *) buffer, temp_buffer + offset, 4);    }}