diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-20 23:42:01 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-16 08:55:22 -0600 |
commit | edb0470b99a9f399ccb5d666173c4315f6cb02c0 (patch) | |
tree | 8a7e1590c59dd1fa72c2d85ca642157f50f8aaaa /gdb/coffread.c | |
parent | 6cccc9a89160455aab634784c231af4590d943f3 (diff) | |
download | gdb-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/coffread.c')
-rw-r--r-- | gdb/coffread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index 0ba5bab..b13d901 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1088,7 +1088,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 (_("`.ef' symbol without matching `.bf' " "symbol ignored starting at symnum %d"), @@ -1099,7 +1099,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 (_("Unmatched .ef symbol(s) ignored " "starting at symnum %d"), @@ -1152,7 +1152,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 (_("`.eb' symbol without matching `.bb' " "symbol ignored starting at symnum %d"), @@ -1168,7 +1168,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, |