@@ -1092,7 +1092,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
/* { main_aux.x_sym.x_misc.x_lnsz.x_lnno
contains number of lines to '}' */
- if (context_stack_depth <= 0)
+ if (outermost_context_p ())
{ /* We attempted to pop an empty context stack. */
complaint (&symfile_complaints,
_("`.ef' symbol without matching `.bf' "
@@ -1104,7 +1104,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
newobj = pop_context ();
/* Stack must be empty now. */
- if (context_stack_depth > 0 || newobj == NULL)
+ if (!outermost_context_p () || newobj == NULL)
{
complaint (&symfile_complaints,
_("Unmatched .ef symbol(s) ignored "
@@ -1159,7 +1159,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
}
else if (strcmp (cs->c_name, ".eb") == 0)
{
- if (context_stack_depth <= 0)
+ if (outermost_context_p ())
{ /* We attempted to pop an empty context stack. */
complaint (&symfile_complaints,
_("`.eb' symbol without matching `.bb' "
@@ -1177,7 +1177,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
symnum);
break;
}
- if (local_symbols && context_stack_depth > 0)
+ if (local_symbols && !outermost_context_p ())
{
tmpaddr =
cs->c_value + ANOFFSET (objfile->section_offsets,
@@ -2557,7 +2557,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
the current block. */
struct block *block;
- if (context_stack_depth <= 0)
+ if (outermost_context_p ())
{
lbrac_mismatch_complaint (symnum);
break;
@@ -2626,7 +2626,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
valu += function_start_offset;
- if (context_stack_depth <= 0)
+ if (outermost_context_p ())
{
lbrac_mismatch_complaint (symnum);
break;
@@ -2950,7 +2950,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
break;
}
- if (context_stack_depth > 0)
+ if (!outermost_context_p ())
{
struct block *block;
@@ -11140,7 +11140,7 @@ read_namespace_alias (struct die_info *die, struct dwarf2_cu *cu)
static struct using_direct **
using_directives (enum language language)
{
- if (language == language_ada && context_stack_depth == 0)
+ if (language == language_ada && outermost_context_p ())
return get_global_using_directives ();
else
return get_local_using_directives ();
@@ -21472,7 +21472,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
when we do not have enough information to show inlined frames;
pretend it's a local variable in that case so that the user can
still see it. */
- if (context_stack_depth > 0
+ if (!outermost_context_p ()
&& context_stack[context_stack_depth - 1].name != NULL)
SYMBOL_IS_ARGUMENT (sym) = 1;
attr = dwarf2_attr (die, DW_AT_location, cu);
@@ -1395,7 +1395,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
/* { main_aux.x_sym.x_misc.x_lnsz.x_lnno
contains number of lines to '}' */
- if (context_stack_depth <= 0)
+ if (outermost_context_p ())
{ /* We attempted to pop an empty context stack. */
ef_complaint (cs->c_symnum);
within_function = 0;
@@ -1403,7 +1403,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
}
newobj = pop_context ();
/* Stack must be empty now. */
- if (context_stack_depth > 0 || newobj == NULL)
+ if (!outermost_context_p () || newobj == NULL)
{
ef_complaint (cs->c_symnum);
within_function = 0;
@@ -1488,7 +1488,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
}
else if (strcmp (cs->c_name, ".eb") == 0)
{
- if (context_stack_depth <= 0)
+ if (outermost_context_p ())
{ /* We attempted to pop an empty context stack. */
eb_complaint (cs->c_symnum);
break;
@@ -1499,7 +1499,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
eb_complaint (cs->c_symnum);
break;
}
- if (local_symbols && context_stack_depth > 0)
+ if (local_symbols && !outermost_context_p ())
{
/* Make a block for the local symbols within. */
finish_block (newobj->name, &local_symbols,