\f
struct xcoff_symfile_info
{
- file_ptr min_lineno_offset {}; /* Where in file lowest line#s are. */
- file_ptr max_lineno_offset {}; /* 1+last byte of line#s in file. */
-
/* Pointer to the string table. */
char *strtbl = nullptr;
}
}
-/* Support for line number handling. */
-
-/* This function is called for every section; it finds the outer limits
- * of the line table (minimum and maximum file offset) so that the
- * mainline code can read the whole thing for efficiency.
- */
-static void
-find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo)
-{
- struct xcoff_symfile_info *info;
- int size, count;
- file_ptr offset, maxoff;
-
- count = asect->lineno_count;
-
- if (strcmp (asect->name, ".text") != 0 || count == 0)
- return;
-
- size = count * coff_data (abfd)->local_linesz;
- info = (struct xcoff_symfile_info *) vpinfo;
- offset = asect->line_filepos;
- maxoff = offset + size;
-
- if (offset < info->min_lineno_offset || info->min_lineno_offset == 0)
- info->min_lineno_offset = offset;
-
- if (maxoff > info->max_lineno_offset)
- info->max_lineno_offset = maxoff;
-}
-
/* Do initialization in preparation for reading symbols from OBJFILE.
We will only be called if this is an XCOFF or XCOFF-like file.
num_symbols = bfd_get_symcount (abfd); /* # of symbols */
symtab_offset = obj_sym_filepos (abfd); /* symbol table file offset */
- info->min_lineno_offset = 0;
- info->max_lineno_offset = 0;
- for (asection *sec : gdb_bfd_sections (abfd))
- find_linenos (abfd, sec, info);
-
if (num_symbols > 0)
{
/* Read the .debug section, if present and if we're not ignoring