if (DEPRECATED_GET_SAVED_REGISTER_P ()) { DEPRECATED_GET_SAVED_REGISTER (bufferp, optimizedp, addrp, frame, regnum, lvalp);  if (*lvalp == lval_register) { int regnum; for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++) { if (*addrp == register_offset_hack (current_gdbarch, regnum)) { *realnump = regnum; return; } } internal_error (__FILE__, __LINE__, "Failed to compute the register number corresponding" " to 0x%s", paddr_d (*addrp)); } *realnump = -1; return; }
frame_register (struct frame_info *frame, int regnum,		int *optimizedp, enum lval_type *lvalp,		CORE_ADDR *addrp, int *realnump, void *bufferp){  /* Require all but BUFFERP to be valid.  A NULL BUFFERP indicates     that the value proper does not need to be fetched.  */  gdb_assert (optimizedp != NULL);  gdb_assert (lvalp != NULL);  gdb_assert (addrp != NULL);  gdb_assert (realnump != NULL);  /* gdb_assert (bufferp != NULL); */  /* Ulgh!  Old code that, for lval_register, sets ADDRP to the offset     of the register in the register cache.  It should instead return     the REGNUM corresponding to that register.  Translate the .  */  if (DEPRECATED_GET_SAVED_REGISTER_P ())    {      DEPRECATED_GET_SAVED_REGISTER (bufferp, optimizedp, addrp, frame,				     regnum, lvalp);      /* Compute the REALNUM if the caller wants it.  */      if (*lvalp == lval_register)	{	  int regnum;	  for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)	    {	      if (*addrp == register_offset_hack (current_gdbarch, regnum))		{		  *realnump = regnum;		  return;		}	    }	  internal_error (__FILE__, __LINE__,			  "Failed to compute the register number corresponding"			  " to 0x%s", paddr_d (*addrp));	}      *realnump = -1;      return;    }  /* Obtain the register value by unwinding the register from the next     (more inner frame).  */  gdb_assert (frame != NULL && frame->next != NULL);  frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,			 realnump, bufferp);}