+2006-07-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ gdb/
+ * symfile.c (symfile_section_offset_from_segment): Correct
+ last change.
+
+ * solib.c (solib_open): Always set errno.
+
2006-07-11 Daniel Jacobowitz <dan@codesourcery.com>
gdb/
char *temp_pathname = NULL;
char *p;
+ /* By default, return ENOENT. We must set this explicitly because
+ we don't know whether any of the various calls to open or openp
+ below will actually be made; if none of them are, return this
+ instead of whatever errno was on entry. */
+ errno = ENOENT;
+
/* If solib-symbols-extension is set, replace the file's extension. */
if (solib_symbols_extension && *solib_symbols_extension)
{
&& vma < data_segment.p_vaddr + data_segment.p_memsz)
return data_offset;
- else if (bfd_get_section_size (sect) > 0)
+ else
{
- warning (_("Loadable segment \"%s\" outside of ELF segments"),
- bfd_section_name (abfd, sect));
+ if (bfd_get_section_size (sect) > 0)
+ warning (_("Loadable segment \"%s\" outside of ELF segments"),
+ bfd_section_name (abfd, sect));
return 0;
}
}