Merge devo/bfd with GDB's bfd.

Get getopt and obstack from -liberty rather than compiling them here.
* coffread.c: turn a printf into a complain(), and try to deal more
gracefully with botched-looking lineno pointers.
* dbxread.c:  Use bfd_get_symcount rather than bfd_get_symcount_upper_bound.
Don't coredump on files with zero symbols in them (a BFD bug showed this one).
* environ.c:  Pass GNUTARGET into the parent (gdb) as well as the child.
This commit is contained in:
John Gilmore
1991-05-02 03:39:15 +00:00
parent e77463a15c
commit 639893384d
6 changed files with 137 additions and 136 deletions

View File

@ -1404,7 +1404,7 @@ dbx_symfile_init (sf)
info->text_sect = bfd_get_section_by_name (sym_bfd, ".text");
if (!info->text_sect)
abort();
info->symcount = bfd_get_symcount_upper_bound(sym_bfd); /* It's exact for a.out */
info->symcount = bfd_get_symcount (sym_bfd);
/* Read the string table size and check it for bogosity. */
val = lseek (desc, STRING_TABLE_OFFSET, L_SET);
@ -2334,7 +2334,8 @@ read_dbx_symtab (symfile_name, addr,
}
/* If there's stuff to be cleaned up, clean it up. */
if (entry_point < bufp->n_value
if (nlistlen > 0 /* We have some syms */
&& entry_point < bufp->n_value
&& entry_point >= last_o_file_start)
{
startup_file_start = last_o_file_start;