Move declarations of debug_threads and using_threads to header
authorChristian Biesinger <cbiesinger@google.com>
Fri, 20 Sep 2019 02:40:09 +0000 (11:40 +0900)
committerChristian Biesinger <cbiesinger@google.com>
Sat, 21 Sep 2019 02:00:50 +0000 (11:00 +0900)
Instead of declaring debug_threads and using_threads in several
.c files, declare them in debug.h.

gdb/gdbserver/ChangeLog:

2019-09-20  Christian Biesinger  <cbiesinger@google.com>

* debug.c (debug_threads): Remove comment in favor of the header.
* debug.h (using_threads): Add declaration.
(debug_threads): Add comment.
* linux-aarch64-low.c: Include debug.h and remove declaration of
debug_threads.
* nto-low.c: Likewise.
* remote-utils.c: Likewise.
* thread-db.c: Likewise.

gdb/gdbserver/ChangeLog
gdb/gdbserver/debug.c
gdb/gdbserver/debug.h
gdb/gdbserver/linux-aarch64-low.c
gdb/gdbserver/nto-low.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/thread-db.c

index 5c761670145930effdd396425602e6e72fa1d54d..c0c6f51a0695b9891f8c275e7f2f3792d47d6a9d 100644 (file)
@@ -1,3 +1,14 @@
+2019-09-20  Christian Biesinger  <cbiesinger@google.com>
+
+       * debug.c (debug_threads): Remove comment in favor of the header.
+       * debug.h (using_threads): Add declaration.
+       (debug_threads): Add comment.
+       * linux-aarch64-low.c: Include debug.h and remove declaration of
+       debug_threads.
+       * nto-low.c: Likewise.
+       * remote-utils.c: Likewise.
+       * thread-db.c: Likewise.
+
 2019-09-20  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
index 19f11fc17ce4676061ede3002b101c66964b7a57..a764df7688ee656d4f2206c3b27dcc7d88914e84 100644 (file)
@@ -26,8 +26,7 @@ int remote_debug = 0;
 /* Output file for debugging.  Default to standard error.  */
 FILE *debug_file = stderr;
 
-/* Enable miscellaneous debugging output.  The name is historical - it
-   was originally used to debug LinuxThreads support.  */
+/* See debug.h.  */
 int debug_threads;
 
 /* Include timestamps in debugging output.  */
index 07e94eac6eeb4bdfa66205dca6e4e06562b0205d..c136b9c224c74050dfee86d421d831547324cac9 100644 (file)
@@ -28,7 +28,13 @@ extern int remote_debug;
 void debug_set_output (const char *debug_file);
 #endif
 
+extern int using_threads;
+
+/* Enable miscellaneous debugging output.  The name is historical - it
+   was originally used to debug LinuxThreads support.  */
+
 extern int debug_threads;
+
 extern int debug_timestamp;
 
 void debug_flush (void);
index 33095ea752d5fee69e66b814dc865d8c876a5085..ad0481714574cad49fadf6f30e49f419bd3c16c0 100644 (file)
@@ -28,6 +28,7 @@
 #include "elf/common.h"
 #include "ax.h"
 #include "tracepoint.h"
+#include "debug.h"
 
 #include <signal.h>
 #include <sys/user.h>
@@ -153,10 +154,6 @@ aarch64_store_pauthregset (struct regcache *regcache, const void *buf)
                   &pauth_regset[1]);
 }
 
-/* Enable miscellaneous debugging output.  The name is historical - it
-   was originally used to debug LinuxThreads support.  */
-extern int debug_threads;
-
 /* Implementation of linux_target_ops method "get_pc".  */
 
 static CORE_ADDR
index 3c1130680f25b22d3f447757a3664e50a24aa752..d77fda54b8da745dba003322d799e9c13d5e515e 100644 (file)
@@ -22,6 +22,7 @@
 #include "gdbthread.h"
 #include "nto-low.h"
 #include "hostio.h"
+#include "debug.h"
 
 #include <limits.h>
 #include <fcntl.h>
@@ -32,7 +33,6 @@
 #include <sys/neutrino.h>
 
 
-extern int using_threads;
 int using_threads = 1;
 
 const struct target_desc *nto_tdesc;
index 665fc66c53dbdd1d2551dcd7e5b69fecbe960cc5..d7da4b7aed21eee67a2274962d8d0f91ea33a2e8 100644 (file)
@@ -23,6 +23,7 @@
 #include "target.h"
 #include "gdbthread.h"
 #include "tdesc.h"
+#include "debug.h"
 #include "dll.h"
 #include "gdbsupport/rsp-low.h"
 #include "gdbsupport/netstuff.h"
@@ -109,10 +110,6 @@ static int remote_is_stdio = 0;
 static gdb_fildes_t remote_desc = INVALID_DESCRIPTOR;
 static gdb_fildes_t listen_desc = INVALID_DESCRIPTOR;
 
-/* FIXME headerize? */
-extern int using_threads;
-extern int debug_threads;
-
 #ifdef USE_WIN32API
 # define read(fd, buf, len) recv (fd, (char *) buf, len, 0)
 # define write(fd, buf, len) send (fd, (char *) buf, len, 0)
index b2791b0513a69bb603dd03081b10294a43cde4fd..c6b43a06cca7adee05ac4bfd39d1443a32b60192 100644 (file)
@@ -22,8 +22,7 @@
 
 #include "linux-low.h"
 
-extern int debug_threads;
-
+#include "debug.h"
 #include "gdb_proc_service.h"
 #include "nat/gdb_thread_db.h"
 #include "gdbsupport/gdb_vecs.h"
This page took 0.0340549999999999 seconds and 4 git commands to generate.