[RFA,08/42] Move processing_acc_compilation to dbxread.c

Message ID 20180523045851.11660-9-tom@tromey.com
State New
Headers show
Series
  • Remove globals from buildsym
Related show

Commit Message

Tom Tromey May 23, 2018, 4:58 a.m.
processing_acc_compilation is only used in dbxread.c, so move it
there.

gdb/ChangeLog
2018-05-22  Tom Tromey  <tom@tromey.com>

	* dbxread.c (processing_acc_compilation): New global.
	* buildsym.h (processing_acc_compilation): Don't declare.
---
 gdb/ChangeLog  | 5 +++++
 gdb/buildsym.h | 8 --------
 gdb/dbxread.c  | 8 ++++++++
 3 files changed, 13 insertions(+), 8 deletions(-)

-- 
2.13.6

Comments

Simon Marchi July 8, 2018, 4:15 p.m. | #1
On 2018-05-23 12:58 AM, Tom Tromey wrote:
> processing_acc_compilation is only used in dbxread.c, so move it

> there.


LGTM.

Patch

diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index 61ffc0fd89..088c1d790e 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -74,14 +74,6 @@  EXTERN struct subfile *current_subfile;
 
 EXTERN unsigned char processing_gcc_compilation;
 
-/* When set, we are processing a .o file compiled by sun acc.  This is
-   misnamed; it refers to all stabs-in-elf implementations which use
-   N_UNDF the way Sun does, including Solaris gcc.  Hopefully all
-   stabs-in-elf implementations ever invented will choose to be
-   compatible.  */
-
-EXTERN unsigned char processing_acc_compilation;
-
 /* Count symbols as they are processed, for error messages.  */
 
 EXTERN unsigned int symnum;
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 31de714cc7..eed4a28b90 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -145,6 +145,14 @@  static unsigned int next_file_string_table_offset;
 
 static int symfile_relocatable = 0;
 
+/* When set, we are processing a .o file compiled by sun acc.  This is
+   misnamed; it refers to all stabs-in-elf implementations which use
+   N_UNDF the way Sun does, including Solaris gcc.  Hopefully all
+   stabs-in-elf implementations ever invented will choose to be
+   compatible.  */
+
+static unsigned char processing_acc_compilation;
+
 
 /* The lowest text address we have yet encountered.  This is needed
    because in an a.out file, there is no header field which tells us