This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH] check for empty .eh_frame section


Elena Zannoni writes:
 > 
 > When the exec files are stripped with eu-strip, we get an empty
 > .eh_frame section in the .debug file. Gdb correctly processes the
 > non-empty .eh_frame section in the original stripped exec file, but
 > get confused by the empty section in the .debug file, generating
 > an internal error.
 > 
 > This avoid gdb locating a misleading empty .eh_frame section in the
 > .debug file.
 > 
 > elena
 > 

checked in.


 > 
 > 2003-06-24  Elena Zannoni  <ezannoni@redhat.com>
 > 
 > 	* dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame
 > 	sections.
 > 
 > Index: dwarf2read.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/dwarf2read.c,v
 > retrieving revision 1.96
 > diff -u -p -r1.96 dwarf2read.c
 > --- dwarf2read.c	11 Jun 2003 22:27:11 -0000	1.96
 > +++ dwarf2read.c	24 Jun 2003 22:15:09 -0000
 > @@ -1021,9 +1021,13 @@ dwarf2_locate_sections (bfd *ignore_abfd
 >      }
 >    else if (STREQ (sectp->name, EH_FRAME_SECTION))
 >      {
 > -      dwarf_eh_frame_offset = sectp->filepos;
 > -      dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
 > -      dwarf_eh_frame_section = sectp;
 > +      flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
 > +      if (aflag & SEC_HAS_CONTENTS)
 > +        {
 > +          dwarf_eh_frame_offset = sectp->filepos;
 > +          dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
 > +          dwarf_eh_frame_section = sectp;
 > +        }
 >      }
 >    else if (STREQ (sectp->name, RANGES_SECTION))
 >      {


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