if (CANNOT_STORE_REGISTER (regno)) { return; }
gdb_assert ((size % sizeof (PTRACE_TYPE_RET)) == 0); buf = alloca (size);
store_register (int regno){  /* This isn't really an address.  But ptrace thinks of it as one.  */  CORE_ADDR regaddr;  char mess[128];		/* For messages */  int i;  unsigned int offset;		/* Offset of registers within the u area.  */  int tid;  char buf[MAX_REGISTER_SIZE];  if (CANNOT_STORE_REGISTER (regno))    {      return;    }  /* Overload thread id onto process id */  if ((tid = TIDGET (inferior_ptid)) == 0)    tid = PIDGET (inferior_ptid);	/* no thread id, just use process id */  offset = U_REGS_OFFSET;  regaddr = register_addr (regno, offset);  /* Put the contents of regno into a local buffer */  regcache_collect (regno, buf);  /* Store the local buffer into the inferior a chunk at the time. */  for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))    {      errno = 0;      ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,	      *(PTRACE_XFER_TYPE *) (buf + i));      regaddr += sizeof (PTRACE_XFER_TYPE);      if (errno != 0)	{	  sprintf (mess, "writing register %s (#%d)", 		   REGISTER_NAME (regno), regno);	  perror_with_name (mess);	}    }}