This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: make core_gdbarch static


I'm checking this in.

I noticed that core_gdbarch is public, but there's no need for it to be.
It is only used, and should only be used, in corelow.c.

Tested by grepping, plus rebuilding.
There's a mention of "core_gdbarch" in linux-tdep.c, but that is a local
declaration, not a use of this global.

Tom

2013-06-27  Tom Tromey  <tromey@redhat.com>

	* corelow.c (core_gdbarch): Now static.

Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.133
diff -u -r1.133 corelow.c
--- corelow.c	17 Jun 2013 06:14:24 -0000	1.133
+++ corelow.c	27 Jun 2013 19:38:32 -0000
@@ -67,7 +67,7 @@
 /* FIXME: kettenis/20031023: Eventually this variable should
    disappear.  */
 
-struct gdbarch *core_gdbarch = NULL;
+static struct gdbarch *core_gdbarch = NULL;
 
 /* Per-core data.  Currently, only the section table.  Note that these
    target sections are *not* mapped in the current address spaces' set


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]