gdb: move remote_debug to remote.{h,c}
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 22 Jan 2021 17:39:08 +0000 (12:39 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 22 Jan 2021 17:39:08 +0000 (12:39 -0500)
remote_debug is currently declared in target.h and defined in top.c.
Move them to remote.h and remote.c.

Include remote.h in remote-sim.c, as it uses remote_debug.

gdb/ChangeLog:

* target.h (remote_debug): Move to...
* remote.h (remote_debug): ... here.
* top.c (remote_debug): Move to...
* remote.c (remote_debug): ... here.
* remote-sim.c: Include remote.h.

Change-Id: Iae632d12ff8900b23eee6b2529d6a3cd339a8caa

gdb/ChangeLog
gdb/remote-sim.c
gdb/remote.c
gdb/remote.h
gdb/target.h
gdb/top.c

index 0eee5b51724e0547f9c1054b4bc952832d70c8fd..ceb6b103f303bc8367f2bdc969d96ee69c6903c0 100644 (file)
@@ -1,3 +1,11 @@
+2021-01-22  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * target.h (remote_debug): Move to...
+       * remote.h (remote_debug): ... here.
+       * top.c (remote_debug): Move to...
+       * remote.c (remote_debug): ... here.
+       * remote-sim.c: Include remote.h.
+
 2021-01-22  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * cli/cli-cmds.c (show_remote_debug): Remove.
index b21a4e80ee6a4f6cd5cf731bf709d090b1392d7e..d51130562fb1e0ed2e240f4abd4418eb846e1b74 100644 (file)
@@ -43,6 +43,7 @@
 #include "gdbthread.h"
 #include "gdbsupport/byte-vector.h"
 #include "memory-map.h"
+#include "remote.h"
 
 /* Prototypes */
 
index 3793128a866b93ae1cf90eb4e554a85f0452289e..79ce6a3446352278c2d200bb2ed2479983659b69 100644 (file)
@@ -87,6 +87,10 @@ Use a remote computer via a serial line, using a gdb-specific protocol.\n\
 Specify the serial device it is connected to\n\
 (e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).");
 
+/* See remote.h  */
+
+int remote_debug = 0;
+
 #define OPAQUETHREADBYTES 8
 
 /* a 64 bit opaque identifier */
index 51cdbcccc040eea4fbda63809733a1ca997e436e..de582a2dd4cb49a763bfe7715f83dd9d962c73d0 100644 (file)
 struct target_desc;
 struct remote_target;
 
+/* Debugging level.  0 is off, and non-zero values mean to print some debug
+   information (higher values, more information).  */
+extern int remote_debug;
+
 /* Read a packet from the remote machine, with error checking, and
    store it in *BUF.  Resize *BUF using xrealloc if necessary to hold
    the result, and update *SIZEOF_BUF.  If FOREVER, wait forever
index 40bf416cd6779a718048a56e14b191f380f3f829..917476d16ab65145d4aa93c3d03178f952c33b72 100644 (file)
@@ -2473,9 +2473,6 @@ extern gdb::optional<gdb::char_vector> target_get_osdata (const char *type);
 
 /* Stuff that should be shared among the various remote targets.  */
 
-/* Debugging level.  0 is off, and non-zero values mean to print some debug
-   information (higher values, more information).  */
-extern int remote_debug;
 
 /* Timeout limit for response from target.  */
 extern int remote_timeout;
index 4b0defd58fcf8b2db82be2962e717426385e5530..15fbd6d27e68b4244737a1df0be333378f63298a 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -198,10 +198,6 @@ bool server_command;
 
 int remote_timeout = 2;
 
-/* Non-zero tells remote* modules to output debugging info.  */
-
-int remote_debug = 0;
-
 /* Sbrk location on entry to main.  Used for statistics only.  */
 #ifdef HAVE_USEFUL_SBRK
 char *lim_at_start;
This page took 0.051737 seconds and 4 git commands to generate.