This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 09/15 v2] Mostly remove GDBSERVER from linux-waitpid.c
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>, Doug Evans <dje at google dot com>
- Date: Wed, 16 Jul 2014 15:17:17 +0100
- Subject: [PATCH 09/15 v2] Mostly remove GDBSERVER from linux-waitpid.c
- Authentication-results: sourceware.org; auth=none
- References: <1405520243-17282-1-git-send-email-gbenson at redhat dot com>
This commit mostly removes the use of GDBSERVER from
nat/linux-waitpid.c. A use remains for some debugging
code that I will remove when the Linux thread_db code
is refactored.
gdb/
2014-07-16 Gary Benson <gbenson@redhat.com>
* nat/linux-waitpid.c: Don't include server.h or defs.h.
(linux_debug) [debug_threads]: New declaration.
---
gdb/ChangeLog | 5 +++++
gdb/nat/linux-waitpid.c | 13 +++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gdb/nat/linux-waitpid.c b/gdb/nat/linux-waitpid.c
index 5159f03..8c01b4a 100644
--- a/gdb/nat/linux-waitpid.c
+++ b/gdb/nat/linux-waitpid.c
@@ -17,12 +17,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#include "signal.h"
-#endif
+#include "config.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <errno.h>
#include "linux-nat.h"
#include "linux-waitpid.h"
@@ -37,6 +36,8 @@ static inline void
linux_debug (const char *format, ...)
{
#ifdef GDBSERVER
+ extern int debug_threads;
+
if (debug_threads)
{
va_list args;
--
1.7.1