This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: make core_gdbarch static
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 27 Jun 2013 13:38:45 -0600
- Subject: 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