/* Line numbers are not necessarily ordered. xlc compilation will
put static function to the end. */
+ struct subfile *current_subfile = get_current_subfile ();
lineTb = arrange_linetable (lv);
if (lv == lineTb)
{
if (fakename == NULL)
fakename = " ?";
start_subfile (fakename);
- xfree (current_subfile->name);
+ xfree (get_current_subfile ()->name);
}
+ struct subfile *current_subfile = get_current_subfile ();
current_subfile->name = xstrdup (inclTable[ii].name);
#endif
/* { 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;
break;
}
- newobj = pop_context ();
+ struct context_stack cstk = pop_context ();
/* Stack must be empty now. */
- if (context_stack_depth > 0 || newobj == NULL)
+ if (!outermost_context_p ())
{
ef_complaint (cs->c_symnum);
within_function = 0;
break;
}
- finish_block (newobj->name, &local_symbols, newobj->old_blocks,
- NULL, newobj->start_addr,
+ finish_block (cstk.name, &local_symbols, cstk.old_blocks,
+ NULL, cstk.start_addr,
(fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
+ ANOFFSET (objfile->section_offsets,
}
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;
}
- newobj = pop_context ();
- if (depth-- != newobj->depth)
+ struct context_stack cstk = pop_context ();
+ if (depth-- != cstk.depth)
{
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,
- newobj->old_blocks, NULL,
- newobj->start_addr,
+ finish_block (cstk.name, &local_symbols,
+ cstk.old_blocks, NULL,
+ cstk.start_addr,
(cs->c_value
+ ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile))));
}
- local_symbols = newobj->locals;
+ local_symbols = cstk.locals;
}
break;