This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] When can we remove Sun-specific stabs support? (when will it be ok to delete partial_symtab.section_offsets?)


While working on improving some symbol table code I stumbled on
partial_symtab.section_offsets and that led me to elfstab_offset_sections.

AFAICT, the only reason partial_symtab.section_offsets exists is for
Sun stabs.  There are no regressions if I comment out
elfstab_offset_sections on linux+stabs.
Grep for in doc/stabs.texinfo for further background.


/* When handling an ELF file that contains Sun STABS debug info,
   some of the debug info is relative to the particular chunk of the
   section that was generated in its individual .o file.  E.g.
   offsets to static variables are relative to the start of the data
   segment *for that module before linking*.  This information is
   painfully squirreled away in the ELF symbol table as local symbols
   with wierd names.  Go get 'em when needed.  */


#ifdef HAVE_ELF
  /* If we're handling an ELF file, drag some section-relocation info
     for this source file out of the ELF symbol table, to compensate for
     Sun brain death.  This replaces the section_offsets in this psymtab,
     if successful.  */
  elfstab_offset_sections (objfile, result);

N.B. I'm not suggesting remove stabs support, just this hack for Sun stabs.

Deleting partial_symtab.section_offsets will simplify some code
(for non-sun-stabs it's just a pointer to objfile->section_offsets).
It'll also help the ObjfileSplitting project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]