aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-07-18 09:27:17 -0600
committerTom Tromey <tromey@redhat.com>2014-07-18 09:59:31 -0600
commite8b2341cd2c3663d245651129202f22548766a64 (patch)
tree7a439066080bf18270cad9e69d0823e527dccf0d
parent44e89118cb33b71a1eaf6514ea2b686aac1974dd (diff)
downloadgdb-e8b2341cd2c3663d245651129202f22548766a64.zip
gdb-e8b2341cd2c3663d245651129202f22548766a64.tar.gz
gdb-e8b2341cd2c3663d245651129202f22548766a64.tar.bz2
make exec_ops static
While working on some target stack changes, I noticed that exec_ops is only used from exec.c. This patch makes it "static". This is cleaner and makes it simpler to reason about the use of the target. Tested by rebuilding. I'm checking this in as obvious. 2014-07-18 Tom Tromey <tromey@redhat.com> * exec.c (exec_ops): Now static. * exec.h (exec_ops): Don't declare.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/exec.c2
-rw-r--r--gdb/exec.h2
3 files changed, 6 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d0536af..6a6708a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-07-18 Tom Tromey <tromey@redhat.com>
+ * exec.c (exec_ops): Now static.
+ * exec.h (exec_ops): Don't declare.
+
+2014-07-18 Tom Tromey <tromey@redhat.com>
+
* spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Pass "self"
to find_target_beneath.
* ravenscar-thread.c (ravenscar_prepare_to_store): Pass "ops" to
diff --git a/gdb/exec.c b/gdb/exec.c
index 5176bf1..7ba2720 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -61,7 +61,7 @@ void _initialize_exec (void);
/* The target vector for executable files. */
-struct target_ops exec_ops;
+static struct target_ops exec_ops;
/* True if the exec target is pushed on the stack. */
static int using_exec_ops;
diff --git a/gdb/exec.h b/gdb/exec.h
index 304310f..1d77e24 100644
--- a/gdb/exec.h
+++ b/gdb/exec.h
@@ -29,8 +29,6 @@ struct target_ops;
struct bfd;
struct objfile;
-extern struct target_ops exec_ops;
-
#define exec_bfd current_program_space->ebfd
#define exec_bfd_mtime current_program_space->ebfd_mtime
#define exec_filename current_program_space->pspace_exec_filename