nvals = sscanf (buf, "Text=%lx;Data=%lx;Bss=%lx", &text_addr, &data_addr, &bss_addr); if (nvals != 3)
text_addr = data_addr = bss_addr = 0; ptr = buf; lose = 0;  if (strncmp (ptr, "Text=", 5) == 0) { ptr += 5;  while (*ptr && *ptr != ';') text_addr = (text_addr << 4) + fromhex (*ptr++); } else lose = 1;  if (!lose && strncmp (ptr, ";Data=", 6) == 0) { ptr += 6; while (*ptr && *ptr != ';') data_addr = (data_addr << 4) + fromhex (*ptr++); } else lose = 1;  if (!lose && strncmp (ptr, ";Bss=", 5) == 0) { ptr += 5; while (*ptr && *ptr != ';') bss_addr = (bss_addr << 4) + fromhex (*ptr++); } else lose = 1;  if (lose)
get_offsets (){  char buf[PBUFSIZ];  int nvals;  CORE_ADDR text_addr, data_addr, bss_addr;  struct section_offsets *offs;  putpkt ("qOffsets");  getpkt (buf, 0);  if (buf[0] == '\000')    return;			/* Return silently.  Stub doesn't support this				   command. */  if (buf[0] == 'E')    {      warning ("Remote failure reply: %s", buf);      return;    }  nvals = sscanf (buf, "Text=%lx;Data=%lx;Bss=%lx", &text_addr, &data_addr,		  &bss_addr);  if (nvals != 3)    error ("Malformed response to offset query, %s", buf);  if (symfile_objfile == NULL)    return;  offs = (struct section_offsets *) alloca (sizeof (struct section_offsets)					    + symfile_objfile->num_sections					    * sizeof (offs->offsets));  memcpy (offs, symfile_objfile->section_offsets,	  sizeof (struct section_offsets)	  + symfile_objfile->num_sections	  * sizeof (offs->offsets));  ANOFFSET (offs, SECT_OFF_TEXT) = text_addr;  /* This is a temporary kludge to force data and bss to use the same offsets     because that's what nlmconv does now.  The real solution requires changes     to the stub and remote.c that I don't have time to do right now.  */  ANOFFSET (offs, SECT_OFF_DATA) = data_addr;  ANOFFSET (offs, SECT_OFF_BSS) = data_addr;  objfile_relocate (symfile_objfile, offs);}