mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-15 03:48:11 +08:00
* mipsread.c (parse_symbol): Put stStaticProc symbols in minimal
symbols as mst_file_text.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
Mon Jul 26 13:17:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Mon Jul 26 13:17:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* mipsread.c (parse_symbol): Put stStaticProc symbols in minimal
|
||||||
|
symbols as mst_file_text.
|
||||||
|
|
||||||
* hppa-tdep.c (pc_in_linker_stub): Return 0 if can't read memory.
|
* hppa-tdep.c (pc_in_linker_stub): Return 0 if can't read memory.
|
||||||
|
|
||||||
* stabsread.c (rs6000_builtin_type): Make logical types be
|
* stabsread.c (rs6000_builtin_type): Make logical types be
|
||||||
|
@ -817,8 +817,14 @@ parse_symbol (sh, ax, ext_sh, bigend)
|
|||||||
add_symbol (s, top_stack->cur_block);
|
add_symbol (s, top_stack->cur_block);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case stStaticProc:
|
||||||
|
/* I believe this is used only for file-local functions.
|
||||||
|
The comment in symconst.h ("load time only static procs") isn't
|
||||||
|
particularly clear on this point. */
|
||||||
|
prim_record_minimal_symbol (name, sh->value, mst_file_text);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
case stProc: /* Procedure, usually goes into global block */
|
case stProc: /* Procedure, usually goes into global block */
|
||||||
case stStaticProc: /* Static procedure, goes into current block */
|
|
||||||
s = new_symbol (name);
|
s = new_symbol (name);
|
||||||
SYMBOL_NAMESPACE (s) = VAR_NAMESPACE;
|
SYMBOL_NAMESPACE (s) = VAR_NAMESPACE;
|
||||||
SYMBOL_CLASS (s) = LOC_BLOCK;
|
SYMBOL_CLASS (s) = LOC_BLOCK;
|
||||||
@ -922,11 +928,12 @@ parse_symbol (sh, ax, ext_sh, bigend)
|
|||||||
|
|
||||||
ecoff_swap_sym_in (cur_bfd, ext_tsym, &tsym);
|
ecoff_swap_sym_in (cur_bfd, ext_tsym, &tsym);
|
||||||
|
|
||||||
if (tsym.st == stEnd)
|
switch (tsym.st)
|
||||||
break;
|
|
||||||
|
|
||||||
if (tsym.st == stMember)
|
|
||||||
{
|
{
|
||||||
|
case stEnd:
|
||||||
|
goto end_of_fields;
|
||||||
|
|
||||||
|
case stMember:
|
||||||
if (nfields == 0 && type_code == TYPE_CODE_UNDEF)
|
if (nfields == 0 && type_code == TYPE_CODE_UNDEF)
|
||||||
/* If the type of the member is Nil (or Void),
|
/* If the type of the member is Nil (or Void),
|
||||||
without qualifiers, assume the tag is an
|
without qualifiers, assume the tag is an
|
||||||
@ -945,29 +952,47 @@ parse_symbol (sh, ax, ext_sh, bigend)
|
|||||||
nfields++;
|
nfields++;
|
||||||
if (tsym.value > max_value)
|
if (tsym.value > max_value)
|
||||||
max_value = tsym.value;
|
max_value = tsym.value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case stTypedef:
|
||||||
|
case stConstant:
|
||||||
|
case stStaticProc:
|
||||||
|
complain (&block_member_complaint, tsym.st);
|
||||||
|
/* These are said to show up in cfront-generated programs.
|
||||||
|
Apparently processing them like the following prevents
|
||||||
|
core dumps. */
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
|
case stBlock:
|
||||||
|
case stUnion:
|
||||||
|
case stEnum:
|
||||||
|
case stStruct:
|
||||||
|
case stParsed:
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
/* This is a no-op; is it trying to tell us something
|
||||||
|
we should be checking? */
|
||||||
|
if (tsym.sc == scVariant); /*UNIMPLEMENTED*/
|
||||||
|
#endif
|
||||||
|
if (tsym.index != 0)
|
||||||
|
{
|
||||||
|
/* This is something like a struct within a
|
||||||
|
struct. Skip over the fields of the inner
|
||||||
|
struct. The -1 is because the for loop will
|
||||||
|
increment ext_tsym. */
|
||||||
|
ext_tsym = (ecoff_data (cur_bfd)->external_sym
|
||||||
|
+ cur_fdr->isymBase
|
||||||
|
+ tsym.index
|
||||||
|
- 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
complain (&block_member_complaint, tsym.st);
|
||||||
}
|
}
|
||||||
else if (tsym.st == stBlock
|
|
||||||
|| tsym.st == stUnion
|
|
||||||
|| tsym.st == stEnum
|
|
||||||
|| tsym.st == stStruct
|
|
||||||
|| tsym.st == stParsed)
|
|
||||||
{
|
|
||||||
if (tsym.sc == scVariant); /*UNIMPLEMENTED*/
|
|
||||||
if (tsym.index != 0)
|
|
||||||
{
|
|
||||||
/* This is something like a struct within a
|
|
||||||
struct. Skip over the fields of the inner
|
|
||||||
struct. The -1 is because the for loop will
|
|
||||||
increment ext_tsym. */
|
|
||||||
ext_tsym = (ecoff_data (cur_bfd)->external_sym
|
|
||||||
+ cur_fdr->isymBase
|
|
||||||
+ tsym.index
|
|
||||||
- 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
complain (&block_member_complaint, tsym.st);
|
|
||||||
}
|
}
|
||||||
|
end_of_fields:;
|
||||||
|
|
||||||
/* In an stBlock, there is no way to distinguish structs,
|
/* In an stBlock, there is no way to distinguish structs,
|
||||||
unions, and enums at this point. This is a bug in the
|
unions, and enums at this point. This is a bug in the
|
||||||
|
Reference in New Issue
Block a user