aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-20 23:42:01 -0600
committerTom Tromey <tom@tromey.com>2018-07-16 08:55:22 -0600
commitedb0470b99a9f399ccb5d666173c4315f6cb02c0 (patch)
tree8a7e1590c59dd1fa72c2d85ca642157f50f8aaaa /gdb/xcoffread.c
parent6cccc9a89160455aab634784c231af4590d943f3 (diff)
downloadgdb-edb0470b99a9f399ccb5d666173c4315f6cb02c0.zip
gdb-edb0470b99a9f399ccb5d666173c4315f6cb02c0.tar.gz
gdb-edb0470b99a9f399ccb5d666173c4315f6cb02c0.tar.bz2
Use outermost_context_p in more places
This changes a few explicit checks of context_stack_depth to use outermost_context_p instead. This simplifies some future work. gdb/ChangeLog 2018-07-16 Tom Tromey <tom@tromey.com> * xcoffread.c (read_xcoff_symtab): Use outermost_context_p. * dwarf2read.c (using_directives, new_symbol): Use outermost_context_p. * dbxread.c (process_one_symbol): Use outermost_context_p. * coffread.c (coff_symtab_read): Use outermost_context_p.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index f9f19e7..7f4e63e 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1391,7 +1391,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;
@@ -1399,7 +1399,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;
@@ -1483,7 +1483,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;
@@ -1494,7 +1494,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,