aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-06-26 21:20:39 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-06-26 21:20:39 +0000
commit3799ccc6c68a2e864690e42a8ae0b64f071d0948 (patch)
tree3c872bf4e0944b6e510dc7670d34075a129556b1 /gdb/dwarf2read.c
parent9c14acb80f91778d5d99a100d872c23398b67e2d (diff)
downloadgdb-3799ccc6c68a2e864690e42a8ae0b64f071d0948.zip
gdb-3799ccc6c68a2e864690e42a8ae0b64f071d0948.tar.gz
gdb-3799ccc6c68a2e864690e42a8ae0b64f071d0948.tar.bz2
2003-06-26 Elena Zannoni <ezannoni@redhat.com>
* dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame sections.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 55b335d..1d68eff 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))
{