for (i = 0; i < s->_raw_size; i += numbytes)
for (i = 0; i < bfd_get_section_size (s); i += numbytes)
mips_load_srec (char *args){  bfd *abfd;  asection *s;  char *buffer, srec[1024];  unsigned int i;  unsigned int srec_frame = 200;  int reclen;  static int hashmark = 1;  buffer = alloca (srec_frame * 2 + 256);  abfd = bfd_openr (args, 0);  if (!abfd)    {      printf_filtered ("Unable to open file %s\n", args);      return;    }  if (bfd_check_format (abfd, bfd_object) == 0)    {      printf_filtered ("File is not an object file\n");      return;    }/* This actually causes a download in the IDT binary format: */  mips_send_command (LOAD_CMD, 0);  for (s = abfd->sections; s; s = s->next)    {      if (s->flags & SEC_LOAD)	{	  unsigned int numbytes;	  /* FIXME!  vma too small????? */	  printf_filtered ("%s\t: 0x%4lx .. 0x%4lx  ", s->name,			   (long) s->vma,			   (long) (s->vma + s->_raw_size));	  gdb_flush (gdb_stdout);	  for (i = 0; i < s->_raw_size; i += numbytes)	    {	      numbytes = min (srec_frame, s->_raw_size - i);	      bfd_get_section_contents (abfd, s, buffer, i, numbytes);	      reclen = mips_make_srec (srec, '3', s->vma + i, buffer, numbytes);	      send_srec (srec, reclen, s->vma + i);	      if (ui_load_progress_hook)		ui_load_progress_hook (s->name, i);	      if (hashmark)		{		  putchar_unfiltered ('#');		  gdb_flush (gdb_stdout);		}	    }			/* Per-packet (or S-record) loop */	  putchar_unfiltered ('\n');	}			/* Loadable sections */    }  if (hashmark)    putchar_unfiltered ('\n');  /* Write a type 7 terminator record. no data for a type 7, and there     is no data, so len is 0.  */  reclen = mips_make_srec (srec, '7', abfd->start_address, NULL, 0);  send_srec (srec, reclen, abfd->start_address);  serial_flush_input (mips_desc);}