public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move interpreter_p declaration to main.h
@ 2019-05-08 16:46 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-05-08 16:46 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b0be6c912f9e901a87740c72f18be1e54ad5267d

commit b0be6c912f9e901a87740c72f18be1e54ad5267d
Author: Tom Tromey <tromey@adacore.com>
Date:   Wed May 1 12:28:45 2019 -0600

    Move interpreter_p declaration to main.h
    
    This moves the interpreter_p declaration from defs.h to main.h.  I
    think this makes more sense, as it is defined in main.c.  Also, this
    declaration was in the wrong place -- between a comment and the things
    the comment described.
    
    gdb/ChangeLog
    2019-05-08  Tom Tromey  <tromey@adacore.com>
    
    	* tui/tui-interp.c: Include main.h.
    	* interps.c: Include main.h.
    	* main.h (interpreter_p): Declare.
    	* defs.h (interpreter_p): Don't declare.

Diff:
---
 gdb/ChangeLog        | 7 +++++++
 gdb/defs.h           | 3 ---
 gdb/interps.c        | 1 +
 gdb/main.h           | 3 +++
 gdb/tui/tui-interp.c | 1 +
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0293096..700afe7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 2019-05-08  Tom Tromey  <tromey@adacore.com>
 
+	* tui/tui-interp.c: Include main.h.
+	* interps.c: Include main.h.
+	* main.h (interpreter_p): Declare.
+	* defs.h (interpreter_p): Don't declare.
+
+2019-05-08  Tom Tromey  <tromey@adacore.com>
+
 	* dwarf2loc.c: Include dwarf2read.h.
 	* defs.h (read_unsigned_leb128): Don't declare.
 	* dwarf2read.h (read_unsigned_leb128): Declare.
diff --git a/gdb/defs.h b/gdb/defs.h
index 673a200..5a1995b 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -584,9 +584,6 @@ extern int watchdog;
 
 /* Hooks for alternate command interfaces.  */
 
-/* * The name of the interpreter if specified on the command line.  */
-extern char *interpreter_p;
-
 struct target_waitstatus;
 struct cmd_list_element;
 
diff --git a/gdb/interps.c b/gdb/interps.c
index b62e333..dfd6eb9 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -38,6 +38,7 @@
 #include "completer.h"
 #include "top.h"		/* For command_loop.  */
 #include "continuations.h"
+#include "main.h"
 
 /* Each UI has its own independent set of interpreters.  */
 
diff --git a/gdb/main.h b/gdb/main.h
index e707bf3..e44779a 100644
--- a/gdb/main.h
+++ b/gdb/main.h
@@ -35,6 +35,9 @@ extern int return_child_result_value;
 extern int batch_silent;
 extern int batch_flag;
 
+/* * The name of the interpreter if specified on the command line.  */
+extern char *interpreter_p;
+
 /* From mingw-hdep.c, used by main.c.  */
 
 /* Return argv[0] in absolute form, if possible, or ARGV0 if not.  The
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 14215b8..d1146fe 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -34,6 +34,7 @@
 #include "observable.h"
 #include "gdbthread.h"
 #include "inferior.h"
+#include "main.h"
 
 /* Set to 1 when the TUI mode must be activated when we first start
    gdb.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-08 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 16:46 [binutils-gdb] Move interpreter_p declaration to main.h Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).