\f
/* Things that really are local to this module */
+/* Remember what we deduced to be the source language of this psymtab. */
+
+static enum language psymtab_language = language_unknown;
+
/* MIPS symtab header for the current file */
static HDRR *cur_hdr;
complain (&bad_tag_guess_complaint, name);
TYPE_CODE(tp) = type_code;
}
- if (TYPE_NAME(tp) == NULL || strcmp(TYPE_NAME(tp), name) != 0)
+ if (TYPE_NAME(tp) == NULL || !STREQ (TYPE_NAME(tp), name))
TYPE_NAME(tp) = obsavestring(name, strlen(name),
¤t_objfile -> type_obstack);
}
struct partial_symtab **dependency_list;
int dependencies_used, dependencies_allocated;
struct cleanup *old_chain;
+ char *name;
extern_tab = (EXTR**)obstack_alloc (&objfile->psymbol_obstack,
sizeof(EXTR *) * hdr->iextMax);
ms_type = mst_unknown;
complain (&unknown_ext_complaint, esh->asym.iss);
}
- prim_record_minimal_symbol ((char *)esh->asym.iss,
- esh->asym.value,
- ms_type);
+ name = (char *)esh->asym.iss;
+ prim_record_minimal_symbol (name, esh->asym.value, ms_type);
}
/* Pass 3 over files, over local syms: fill in static symbols */
(It is the second symbol because the first symbol is
the stFile used to signal the start of a file). */
if (fh->csym >= 2
- && strcmp((char *)(((SYMR *)fh->isymBase)[1].iss),
- stabs_symbol) == 0) {
+ && STREQ((char *)(((SYMR *)fh->isymBase)[1].iss), stabs_symbol)) {
processing_gcc_compilation = 2;
for (cur_sdx = 2; cur_sdx < fh->csym; cur_sdx++) {
int type_code;
case stStaticProc: /* Function */
ADD_PSYMBOL_TO_LIST(name, strlen(name),
VAR_NAMESPACE, LOC_BLOCK,
- objfile->static_psymbols, sh->value);
+ objfile->static_psymbols, sh->value,
+ psymtab_language, objfile);
/* Skip over procedure to next one. */
if (sh->index >= hdr->iauxMax)
{
if (sh->sc == scInfo) {
ADD_PSYMBOL_TO_LIST(name, strlen(name),
STRUCT_NAMESPACE, LOC_TYPEDEF,
- objfile->static_psymbols, sh->value);
+ objfile->static_psymbols,
+ sh->value,
+ psymtab_language, objfile);
}
/* Skip over the block */
cur_sdx = sh->index;
/* Use this gdb symbol */
ADD_PSYMBOL_TO_LIST(name, strlen(name),
VAR_NAMESPACE, class,
- objfile->static_psymbols, sh->value);
+ objfile->static_psymbols, sh->value,
+ psymtab_language, objfile);
skip:
cur_sdx++; /* Go to next file symbol */
}
/* See comment in parse_partial_symbols about the @stabs sentinel. */
if (fh && fh->csym >= 2
- && strcmp((char *)(((SYMR *)fh->isymBase)[1].iss), stabs_symbol)
- == 0) {
+ && STREQ((char *)(((SYMR *)fh->isymBase)[1].iss), stabs_symbol)) {
/*
* This symbol table contains stabs-in-ecoff entries.
if (SYMBOL_NAME(sym)[0] == inc
&& SYMBOL_NAMESPACE(sym) == namespace
&& SYMBOL_CLASS(sym) == class
- && !strcmp(SYMBOL_NAME(sym), name))
+ && STREQ(SYMBOL_NAME(sym), name))
return sym;
bot++;
}
if (b == top_stack->cur_block &&
nsyms >= top_stack->maxsyms) {
- complain (&block_overflow_complaint, s->name);
+ complain (&block_overflow_complaint, SYMBOL_NAME (s));
/* In this case shrink_block is actually grow_block, since
BLOCK_NSYMS(b) is larger than its current size. */
origb = b;
/* Missing basic types */
builtin_type_string =
- init_type(TYPE_CODE_PASCAL_ARRAY,
+ init_type(TYPE_CODE_STRING,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "string",
(struct objfile *) NULL);