diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aba954f143..2ef8598c26 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-12-21 Joel Brobecker + + * objfiles.c (insert_section_p): Do not detect overlay sections + if overlay debugging is off. + 2011-12-21 Joel Brobecker * ada-lang.c (is_name_suffix): Add handling of "TKB" suffixes. diff --git a/gdb/objfiles.c b/gdb/objfiles.c index fb26420338..1cb1698e7a 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -1117,7 +1117,7 @@ insert_section_p (const struct bfd *abfd, { const bfd_vma lma = bfd_section_lma (abfd, section); - if (lma != 0 && lma != bfd_section_vma (abfd, section) + if (overlay_debugging && lma != 0 && lma != bfd_section_vma (abfd, section) && (bfd_get_file_flags (abfd) & BFD_IN_MEMORY) == 0) /* This is an overlay section. IN_MEMORY check is needed to avoid discarding sections from the "system supplied DSO" (aka vdso)