for (offset = 0; offset < core_text_sect->_raw_size; ++offset)
for (offset = 0; offset < core_text_sect->_raw_size; offset += MIN_INSN_SIZE)
DEFUN (core_create_line_syms, (core_bfd), bfd * core_bfd){  char prev_name[PATH_MAX], prev_filename[PATH_MAX];  bfd_vma vma, min_vma = ~0, max_vma = 0;  bfd_vma offset, prev_offset, min_dist;  Sym *prev, dummy, *sentinel, *sym;  const char *filename;  int prev_line_num, i;  Sym_Table ltab;  /*   * Create symbols for functions as usual.  This is necessary in   * cases where parts of a program were not compiled with -g.  For   * those parts we still want to get info at the function level:   */  core_create_function_syms (core_bfd);  /* pass 1 - counter number of symbols: */  /*   * To find all line information, walk through all possible   * text-space addresses (one by one!) and get the debugging   * info for each address.  When the debugging info changes,   * it is time to create a new symbol.   *   * Of course, this is rather slow and it would be better if   * bfd would provide an iterator for enumerating all line   * infos, but for now, we try to speed up the second pass   * by determining what the minimum code distance between two   * lines is.   */  prev_name[0] = '\0';  ltab.len = 0;  min_dist = core_text_sect->_raw_size;  prev_offset = -min_dist;  prev_filename[0] = '\0';  prev_line_num = 0;  for (offset = 0; offset < core_text_sect->_raw_size; ++offset)    {      vma = core_text_sect->vma + offset;      if (!get_src_info (vma, &filename, &dummy.name, &dummy.line_num)	  || (prev_line_num == dummy.line_num &&	      strcmp (prev_name, dummy.name) == 0	      && strcmp (prev_filename, filename) == 0))	{	  continue;	}      ++ltab.len;      prev_line_num = dummy.line_num;      strcpy (prev_name, dummy.name);      strcpy (prev_filename, filename);      if (offset - prev_offset < min_dist)	{	  min_dist = offset - prev_offset;	}      prev_offset = offset;      min_vma = MIN (vma, min_vma);      max_vma = MAX (vma, max_vma);    }  DBG (AOUTDEBUG, printf ("[core_create_line_syms] min_dist=%lx\n", min_dist));  /* make room for function symbols, too: */  ltab.len += symtab.len;  ltab.base = (Sym *) xmalloc (ltab.len * sizeof (Sym));  ltab.limit = ltab.base;  /* pass 2 - create symbols: */  prev = 0;  for (offset = 0; offset < core_text_sect->_raw_size; offset += min_dist)    {      sym_init (ltab.limit);      if (!get_src_info (core_text_sect->vma + offset, &filename,			 &ltab.limit->name, &ltab.limit->line_num)	  || (prev && prev->line_num == ltab.limit->line_num	      && strcmp (prev->name, ltab.limit->name) == 0	      && strcmp (prev->file->name, filename) == 0))	{	  continue;	}      /* make name pointer a malloc'ed string: */      ltab.limit->name = strdup (ltab.limit->name);      ltab.limit->file = source_file_lookup_path (filename);      ltab.limit->addr = core_text_sect->vma + offset;      prev = ltab.limit;      /*       * If we see "main" without an initial '_', we assume names       * are *not* prefixed by '_'.       */      if (ltab.limit->name[0] == 'm' && discard_underscores	  && strcmp (ltab.limit->name, "main") == 0)	{	  discard_underscores = 0;	}      DBG (AOUTDEBUG, printf ("[core_create_line_syms] %d %s 0x%lx\n",			      ltab.len, ltab.limit->name,			      ltab.limit->addr));      ++ltab.limit;    }  /* update sentinels: */  sentinel = sym_lookup (&symtab, 0);  if (strcmp (sentinel->name, "<locore>") == 0      && min_vma <= sentinel->end_addr)    {      sentinel->end_addr = min_vma - 1;    }  sentinel = sym_lookup (&symtab, ~0);  if (strcmp (sentinel->name, "<hicore>") == 0 && max_vma >= sentinel->addr)    {      sentinel->addr = max_vma + 1;    }  /* copy in function symbols: */  memcpy (ltab.limit, symtab.base, symtab.len * sizeof (Sym));  ltab.limit += symtab.len;  if (ltab.limit - ltab.base != ltab.len)    {      fprintf (stderr,	       "%s: somebody miscounted: ltab.len=%ld instead of %d\n",	       whoami, (long) (ltab.limit - ltab.base), ltab.len);      done (1);    }  /* finalize ltab and make it symbol table: */  symtab_finalize (&ltab);  free (symtab.base);  symtab = ltab;  /* now go through all core symbols and set is_static accordingly: */  for (i = 0; i < core_num_syms; ++i)    {      if (core_sym_class (core_syms[i]) == 't')	{	  sym = sym_lookup (&symtab, core_syms[i]->value			    + core_syms[i]->section->vma);	  do	    {	      sym++->is_static = TRUE;	    }	  while (sym->file == sym[-1].file &&		 strcmp (sym->name, sym[-1].name) == 0);	}    }}