char buf[MAX_REGISTER_RAW_SIZE];  sim_fetch_register (regno, buf); supply_register (regno, buf); if (sr_get_debug ()) { printf_filtered ("gdbsim_fetch_register: %d", regno);  dump_mem (buf, REGISTER_RAW_SIZE (regno)); }
case LEGACY_SIM_REGNO_IGNORE: break; case SIM_REGNO_DOES_NOT_EXIST: {  char buf[MAX_REGISTER_SIZE]; int nr_bytes; memset (buf, 0, MAX_REGISTER_SIZE); supply_register (regno, buf); set_register_cached (regno, -1); break; } default: { static int warn_user = 1; char buf[MAX_REGISTER_SIZE]; int nr_bytes; gdb_assert (regno >= 0 && regno < NUM_REGS); memset (buf, 0, MAX_REGISTER_SIZE); nr_bytes = sim_fetch_register (gdbsim_desc, REGISTER_SIM_REGNO (regno), buf, DEPRECATED_REGISTER_RAW_SIZE (regno)); if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (regno) && warn_user) { fprintf_unfiltered (gdb_stderr, "Size of register %s (%d/%d) incorrect (%d instead of %d))", REGISTER_NAME (regno), regno, REGISTER_SIM_REGNO (regno), nr_bytes, DEPRECATED_REGISTER_RAW_SIZE (regno)); warn_user = 0; }   supply_register (regno, buf); if (sr_get_debug ()) { printf_filtered ("gdbsim_fetch_register: %d", regno);  dump_mem (buf, DEPRECATED_REGISTER_RAW_SIZE (regno)); } break; }
gdbsim_fetch_register (regno)int regno;{  if (regno == -1)     {      for (regno = 0; regno < NUM_REGS; regno++)	gdbsim_fetch_register (regno);    }  else    {      char buf[MAX_REGISTER_RAW_SIZE];      sim_fetch_register (regno, buf);      supply_register (regno, buf);      if (sr_get_debug ())	{	  printf_filtered ("gdbsim_fetch_register: %d", regno);	  /* FIXME: We could print something more intelligible.  */	  dump_mem (buf, REGISTER_RAW_SIZE (regno));	}    }}