Move within_function to stabsread
authorTom Tromey <tom@tromey.com>
Sun, 20 May 2018 17:19:14 +0000 (11:19 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 16 Jul 2018 14:55:18 +0000 (08:55 -0600)
commit5985ac614d7e8ae65faadf62e9302c1c096b5647
tree53f530368220eef99dfa603945ca812c013d87d5
parent6b84eeb21628a89b40c985b527d3d5db7806c93c
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.
gdb/ChangeLog
gdb/buildsym.c
gdb/buildsym.h
gdb/coffread.c
gdb/stabsread.c
gdb/stabsread.h