+2010-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * symfile.c (addr_info_make_relative): Move sect declaration to the
+ outer block. Initialize it to NULL. Prefer SECT->next more than
+ bfd_get_section_by_name.
+
2010-04-08 Sami Wagiaalla <swagiaal@redhat.com>
PR Breakpoints/11408:
asection *lower_sect;
CORE_ADDR lower_offset;
int i;
+ asection *sect;
/* Find lowest loadable section to be used as starting point for
continguous sections. */
(the loadable section directly below it in memory).
this_offset = lower_offset = lower_addr - lower_orig_addr */
+ sect = NULL;
for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
{
- asection *sect = bfd_get_section_by_name (abfd, addrs->other[i].name);
+ const char *sect_name = addrs->other[i].name;
+
+ /* Prefer the next section of that we have found last. The separate
+ debug info files have either the same section layout or just a few
+ sections are missing there. On the other hand the section name is not
+ unique and we could find an inappropraite section by its name. */
+
+ if (sect)
+ sect = sect->next;
+ if (sect && strcmp (sect_name, bfd_get_section_name (abfd, sect)) != 0)
+ sect = NULL;
+ if (sect == NULL)
+ sect = bfd_get_section_by_name (abfd, sect_name);
if (sect)
{
/* This is the index used by BFD. */
+2010-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/dup-sect.exp, gdb.base/dup-sect.S: New.
+
2010-04-08 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/gdb2384-base.h: Created 'namespace B'.