summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index f614eb56636..97b117f2008 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1071,9 +1071,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))
{
@@ -2026,6 +2030,8 @@ process_die (struct die_info *die, struct objfile *objfile,
of a function and make GDB `next' properly over inlined functions. */
break;
case DW_TAG_lexical_block:
+ case DW_TAG_try_block:
+ case DW_TAG_catch_block:
read_lexical_block_scope (die, objfile, cu_header);
break;
case DW_TAG_class_type: