From: Elena Zannoni Date: Thu, 26 Jun 2003 21:35:59 +0000 (+0000) Subject: 2003-06-26 Elena Zannoni X-Git-Tag: cagney_x86i386-20030821-branchpoint~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4fe9960757811d43086cbd2afc43ab4fd4d44ec;p=thirdparty%2Fbinutils-gdb.git 2003-06-26 Elena Zannoni * dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame sections. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2775ef00983..39fa022e50c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-26 Elena Zannoni + + * dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame + sections. + 2003-06-26 Andrew Cagney * config/djgpp/fnchange.lst: Fix 8.3 problem with sim/ppc's diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 55b335da9d9..1d68efffbd3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1021,9 +1021,13 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) } 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)) {