if (DEPRECATED_REGISTER_CONVERTIBLE_P () && DEPRECATED_REGISTER_CONVERTIBLE (regnum)) { DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum), raw_buffer, VALUE_CONTENTS_RAW (reg_val)); } else if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum)) memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum)); else internal_error (__FILE__, __LINE__, "Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size", REGISTER_NAME (regnum), regnum, DEPRECATED_REGISTER_RAW_SIZE (regnum), DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer, register_size (current_gdbarch, regnum));
value_of_register (int regnum, struct frame_info *frame){  CORE_ADDR addr;  int optim;  struct value *reg_val;  int realnum;  char raw_buffer[MAX_REGISTER_SIZE];  enum lval_type lval;  /* User registers lie completely outside of the range of normal     registers.  Catch them early so that the target never sees them.  */  if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)    return value_of_user_reg (regnum, frame);  frame_register (frame, regnum, &optim, &lval, &addr, &realnum, raw_buffer);  /* FIXME: cagney/2002-05-15: This test is just bogus.     It indicates that the target failed to supply a value for a     register because it was "not available" at this time.  Problem     is, the target still has the register and so get saved_register()     may be returning a value saved on the stack.  */  if (register_cached (regnum) < 0)    return NULL;		/* register value not available */  reg_val = allocate_value (register_type (current_gdbarch, regnum));  /* Convert raw data to virtual format if necessary.  */  if (DEPRECATED_REGISTER_CONVERTIBLE_P ()      && DEPRECATED_REGISTER_CONVERTIBLE (regnum))    {      DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),					      raw_buffer, VALUE_CONTENTS_RAW (reg_val));    }  else if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum))    memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,	    DEPRECATED_REGISTER_RAW_SIZE (regnum));  else    internal_error (__FILE__, __LINE__,		    "Register \"%s\" (%d) has conflicting raw (%d) and virtual (%d) size",		    REGISTER_NAME (regnum),		    regnum,		    DEPRECATED_REGISTER_RAW_SIZE (regnum),		    DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));  VALUE_LVAL (reg_val) = lval;  VALUE_ADDRESS (reg_val) = addr;  VALUE_REGNO (reg_val) = regnum;  VALUE_OPTIMIZED_OUT (reg_val) = optim;  return reg_val;}