Eliminate uses of NAMES_HAVE_UNDERSCORE, using

bfd_get_symbol_leading_char instead.

* coffread.c (EXTERNAL_NAME):  New macro for removing possible
leading character from names.
(read_coff_symtab):  Use BFD's FILE *, don't open a second one.
(read_coff_symtab):  Complain() about .bb/.eb mismatch, don't error().
(process_coff_symbol, coff_read_struct_type, coff_read_enum_type):
Replace NAMES_HAVE_UNDERSCORE with EXTERNAL_NAME.

* kdb-start.c (main):  Remove NAMES_HAVE_UNDERSCORE.
* minsyms.c (install_minimal_symbols):  Replace NAMES_HAVE_UNDERSCORE.
Remove SOME_NAMES_HAVE_DOT support (apparently unused).
* partial-stab.h:  Replace NAMES_HAVE_UNDERSCORE.
* solib.c:  Replace NAMES_HAVE_UNDERSCORE.
* stabsread.h:  Remove NAMES_HAVE_UNDERSCORE and HASH_OFFSET.
* symfile.c (syms_from_objfile):  Insert debugging check to test
NAMES_HAVE_UNDERSCORE setting against the BFD support.  FIXME,
remove this (and all tm-*.h NAMES_HAVE_UNDERSCORE) soon.

* doc/gdbint.texinfo (Host Conditionals):  Remove
NAMES_HAVE_UNDERSCORE, SOME_NAMES_HAVE_DOT, document
MEM_FNS_DECLARED.
(Target Conditionals):  Remove all of the above.
This commit is contained in:
John Gilmore
1992-12-17 09:15:10 +00:00
parent 8cedeccaa8
commit de9bef49be
8 changed files with 100 additions and 72 deletions

View File

@@ -424,6 +424,7 @@ install_minimal_symbols (objfile)
register struct msym_bunch *bunch;
register struct minimal_symbol *msymbols;
int alloc_count;
register char leading_char;
if (msym_count > 0)
{
@@ -451,24 +452,17 @@ install_minimal_symbols (objfile)
each bunch is full. */
mcount = objfile->minimal_symbol_count;
leading_char = bfd_get_symbol_leading_char (objfile->obfd);
for (bunch = msym_bunch; bunch != NULL; bunch = bunch -> next)
{
for (bindex = 0; bindex < msym_bunch_index; bindex++, mcount++)
{
msymbols[mcount] = bunch -> contents[bindex];
#ifdef NAMES_HAVE_UNDERSCORE
if (msymbols[mcount].name[0] == '_')
if (msymbols[mcount].name[0] == leading_char)
{
msymbols[mcount].name++;
}
#endif
#ifdef SOME_NAMES_HAVE_DOT
if (msymbols[mcount].name[0] == '.')
{
msymbols[mcount].name++;
}
#endif
}
msym_bunch_index = BUNCH_SIZE;
}