Move within_function to stabsread

The global within_function is only used by a few symbol readers.  This
patch moves the global out of buildsym and into stabsread, which
seemed like a better fit.  It also arranges for the existing readers
to clear the global at the appropriate time.

gdb/ChangeLog
2018-07-16  Tom Tromey  <tom@tromey.com>

	* stabsread.h (within_function): Move from buildsym.h.
	* stabsread.c (start_stabs): Clear within_function.
	* coffread.c (coff_start_symtab): Clear within_function.
	* buildsym.h (within_function): Move to stabsread.h.
	* buildsym.c (prepare_for_building): Update.
This commit is contained in:
Tom Tromey
2018-05-20 11:19:14 -06:00
parent 6b84eeb216
commit 5985ac614d
6 changed files with 15 additions and 6 deletions

View File

@ -4758,6 +4758,7 @@ start_stabs (void)
n_this_object_header_files = 1;
type_vector_length = 0;
type_vector = (struct type **) 0;
within_function = 0;
/* FIXME: If common_block_name is not already NULL, we should complain(). */
common_block_name = NULL;