diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-08-27 16:37:45 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-08-27 16:37:45 +0000 |
commit | dc7650b823607b4dd2ebc23b4c30deaaf0ddc0a2 (patch) | |
tree | f2fde2b5f4a6bb372d3de37c8650f1c2e052fd73 | |
parent | 1e8e8b511408a83a62e45892097da167d77c9027 (diff) | |
download | binutils-dc7650b823607b4dd2ebc23b4c30deaaf0ddc0a2.zip binutils-dc7650b823607b4dd2ebc23b4c30deaaf0ddc0a2.tar.gz binutils-dc7650b823607b4dd2ebc23b4c30deaaf0ddc0a2.tar.bz2 |
gdb/
* dwarf2read.c (dwarf2_locate_sections): Move variable aflag here.
Move the SEC_HAS_CONTENTS check here - for any NAMES use.
(dwarf2_locate_sections) <eh_frame>: Move the variable and check from
here.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 15 |
2 files changed, 14 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d17f533..bacebf2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> + + * dwarf2read.c (dwarf2_locate_sections): Move variable aflag here. + Move the SEC_HAS_CONTENTS check here - for any NAMES use. + (dwarf2_locate_sections) <eh_frame>: Move the variable and check from + here. + 2012-08-27 Wei-cheng Wang <cole945@gmail.com> * memattr.c (create_mem_region): Fix memory region overlapping diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 682fd0f..ba5427c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1710,13 +1710,17 @@ static void dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames) { const struct dwarf2_debug_sections *names; + flagword aflag = bfd_get_section_flags (abfd, sectp); if (vnames == NULL) names = &dwarf2_elf_names; else names = (const struct dwarf2_debug_sections *) vnames; - if (section_is_p (sectp->name, &names->info)) + if ((aflag & SEC_HAS_CONTENTS) == 0) + { + } + else if (section_is_p (sectp->name, &names->info)) { dwarf2_per_objfile->info.asection = sectp; dwarf2_per_objfile->info.size = bfd_get_section_size (sectp); @@ -1763,13 +1767,8 @@ dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames) } else if (section_is_p (sectp->name, &names->eh_frame)) { - flagword aflag = bfd_get_section_flags (abfd, sectp); - - if (aflag & SEC_HAS_CONTENTS) - { - dwarf2_per_objfile->eh_frame.asection = sectp; - dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp); - } + dwarf2_per_objfile->eh_frame.asection = sectp; + dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp); } else if (section_is_p (sectp->name, &names->ranges)) { |