Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>,
	GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v7 3/4] Share fork_inferior et al with gdbserver
Date: Wed, 07 Jun 2017 12:29:00 -0000	[thread overview]
Message-ID: <2e012ef6-587b-5883-0626-9f6dbb33d60f@redhat.com> (raw)
In-Reply-To: <20170604221803.17649-4-sergiodj@redhat.com>

So here's the patch showing what I meant in:
 https://sourceware.org/ml/gdb-patches/2017-06/msg00169.html

I'll be happy with the resulting patch once if you fold this in.
Could you do that, retest and repost?

I think we could get rid of the new common-inferior.h
header too, but I'll leave that as is, for now at least.

From 1d66adbd79ab97415d519f18906257e99ce49706 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Wed, 7 Jun 2017 13:18:14 +0100
Subject: [PATCH] Fixes

---
 gdb/common/common-utils.c   |  24 ----------
 gdb/common/common-utils.h   |  16 -------
 gdb/fork-child.c            |   9 ++++
 gdb/gdbserver/configure     |   4 +-
 gdb/gdbserver/configure.ac  |   4 +-
 gdb/gdbserver/configure.srv |   6 +--
 gdb/gdbserver/fork-child.c  | 113 ++++++++++++++++++++++++++++++++++++++++++++
 gdb/gdbserver/linux-low.c   |   4 +-
 gdb/gdbserver/lynx-low.c    |   2 +-
 gdb/gdbserver/server.c      | 100 ++-------------------------------------
 gdb/gdbserver/server.h      |  18 ++++---
 gdb/gdbserver/spu-low.c     |   3 +-
 gdb/gdbserver/utils.c       |   9 ----
 gdb/inf-ptrace.c            |   2 +-
 gdb/inferior.h              |   1 -
 gdb/nat/fork-inferior.c     |  26 ++++++++++
 gdb/nat/fork-inferior.h     |  16 +++++++
 gdb/utils.c                 |   9 ----
 18 files changed, 185 insertions(+), 181 deletions(-)
 create mode 100644 gdb/gdbserver/fork-child.c

diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
index fbec0da..793ab3b 100644
--- a/gdb/common/common-utils.c
+++ b/gdb/common/common-utils.c
@@ -352,27 +352,3 @@ stringify_argv (const std::vector<char *> &args)
 
   return ret;
 }
-
-/* See common/common-inferior.h.  */
-
-void
-trace_start_error (const char *fmt, ...)
-{
-  va_list ap;
-
-  va_start (ap, fmt);
-  warning ("Could not trace the inferior process.\nError: ");
-  vwarning (fmt, ap);
-  va_end (ap);
-
-  gdb_flush_out_err ();
-  _exit (0177);
-}
-
-/* See common/common-inferior.h.  */
-
-void
-trace_start_error_with_name (const char *string)
-{
-  trace_start_error ("%s: %s", string, safe_strerror (errno));
-}
diff --git a/gdb/common/common-utils.h b/gdb/common/common-utils.h
index 38505e0..787bac9 100644
--- a/gdb/common/common-utils.h
+++ b/gdb/common/common-utils.h
@@ -112,20 +112,4 @@ extern void free_vector_argv (std::vector<char *> &v);
    joining all the arguments with a whitespace separating them.  */
 extern std::string stringify_argv (const std::vector<char *> &argv);
 
-/* Flush both stdout and stderr.  This function needs to be
-   implemented differently on GDB and GDBserver.  */
-extern void gdb_flush_out_err ();
-
-/* Report an error that happened when starting to trace the inferior
-   (i.e., when the "traceme_fun" callback is called on fork_inferior)
-   and bail out.  This function does not return.  */
-extern void trace_start_error (const char *fmt, ...)
-  ATTRIBUTE_NORETURN;
-
-/* Like "trace_start_error", but the error message is constructed by
-   combining STRING with the system error message for errno.  This
-   function does not return.  */
-extern void trace_start_error_with_name (const char *string)
-  ATTRIBUTE_NORETURN;
-
 #endif
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 39e49b5..60985d8 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -43,6 +43,15 @@ get_exec_wrapper ()
   return exec_wrapper;
 }
 
+/* See nat/fork-inferior.h.  */
+
+void
+gdb_flush_out_err ()
+{
+  gdb_flush (main_ui->m_gdb_stdout);
+  gdb_flush (main_ui->m_gdb_stderr);
+}
+
 /* The ui structure that will be saved on 'prefork_hook' and
    restored on 'postfork_hook'.  */
 static struct ui *saved_ui = NULL;
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 96befef..b314c41 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -8422,9 +8422,7 @@ fi
 
 if $want_ipa ; then
    if $have_ipa ; then
-     # Needed because safe_strerror's definition is host-dependent
-     strerror_obj="`echo $srv_host_obs | sed 's/\(.*-strerror\)\.o/\1-ipa.o/'`"
-     IPA_DEPFILES="$ipa_obj $strerror_obj"
+     IPA_DEPFILES="$ipa_obj"
      extra_libraries="$extra_libraries libinproctrace.so"
    else
      as_fn_error "inprocess agent not supported for this target" "$LINENO" 5
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 8aa85db..4ea7913 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -462,9 +462,7 @@ esac],
 
 if $want_ipa ; then
    if $have_ipa ; then
-     # Needed because safe_strerror's definition is host-dependent
-     strerror_obj="`echo $srv_host_obs | sed 's/\(.*-strerror\)\.o/\1-ipa.o/'`"
-     IPA_DEPFILES="$ipa_obj $strerror_obj"
+     IPA_DEPFILES="$ipa_obj"
      extra_libraries="$extra_libraries libinproctrace.so"
    else
      AC_MSG_ERROR([inprocess agent not supported for this target])
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 056ac27..43f90c9 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -43,7 +43,7 @@ srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd
 
 # Linux object files.  This is so we don't have to repeat
 # these files over and over again.
-srv_linux_obj="linux-low.o linux-osdata.o linux-procfs.o linux-ptrace.o linux-waitpid.o linux-personality.o linux-namespaces.o fork-inferior.o"
+srv_linux_obj="linux-low.o linux-osdata.o linux-procfs.o linux-ptrace.o linux-waitpid.o linux-personality.o linux-namespaces.o fork-child.o fork-inferior.o"
 
 # Input is taken from the "${target}" variable.
 
@@ -131,7 +131,7 @@ case "${target}" in
 			ipa_obj="${ipa_i386_linux_regobj} linux-i386-ipa.o"
 			;;
   i[34567]86-*-lynxos*)	srv_regobj="i386.o"
-			srv_tgtobj="lynx-low.o lynx-i386-low.o fork-inferior.o"
+			srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o"
 			srv_xmlfiles="i386/i386.xml"
 			srv_xmlfiles="${srv_xmlfiles} i386/32bit-core.xml"
 			srv_xmlfiles="${srv_xmlfiles} i386/32bit-sse.xml"
@@ -338,7 +338,7 @@ case "${target}" in
 			srv_linux_thread_db=yes
 			;;
   spu*-*-*)		srv_regobj=reg-spu.o
-			srv_tgtobj="spu-low.o fork-inferior.o"
+			srv_tgtobj="spu-low.o fork-child.o fork-inferior.o"
 			;;
   tic6x-*-uclinux)	srv_regobj="tic6x-c64xp-linux.o"
 			srv_regobj="${srv_regobj} tic6x-c64x-linux.o"
diff --git a/gdb/gdbserver/fork-child.c b/gdb/gdbserver/fork-child.c
new file mode 100644
index 0000000..a1a8ff1
--- /dev/null
+++ b/gdb/gdbserver/fork-child.c
@@ -0,0 +1,113 @@
+/* Fork a Unix child process, and set up to debug it, for GDBserver.
+   Copyright (C) 1989-2017 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "server.h"
+#include "job-control.h"
+#include "nat/fork-inferior.h"
+
+#ifdef SIGTTOU
+/* A file descriptor for the controlling terminal.  */
+static int terminal_fd;
+
+/* TERMINAL_FD's original foreground group.  */
+static pid_t old_foreground_pgrp;
+
+/* Hand back terminal ownership to the original foreground group.  */
+
+static void
+restore_old_foreground_pgrp (void)
+{
+  tcsetpgrp (terminal_fd, old_foreground_pgrp);
+}
+#endif
+
+/* See nat/fork-inferior.h.  */
+
+void
+prefork_hook (const char *args)
+{
+  if (debug_threads)
+    {
+      debug_printf ("args: %s\n", args);
+      debug_flush ();
+    }
+
+#ifdef SIGTTOU
+  signal (SIGTTOU, SIG_DFL);
+  signal (SIGTTIN, SIG_DFL);
+#endif
+
+  /* Clear this so the backend doesn't get confused, thinking
+     CONT_THREAD died, and it needs to resume all threads.  */
+  cont_thread = null_ptid;
+}
+
+/* See nat/fork-inferior.h.  */
+
+void
+postfork_hook (pid_t pid)
+{
+}
+
+/* See nat/fork-inferior.h.  */
+
+void
+postfork_child_hook ()
+{
+  /* This is set to the result of setpgrp, which if vforked, will be
+     visible to you in the parent process.  It's only used by humans
+     for debugging.  */
+  static int debug_setpgrp = 657473;
+
+  debug_setpgrp = gdb_setpgid ();
+  if (debug_setpgrp == -1)
+    perror (_("setpgrp failed in child"));
+}
+
+/* See nat/fork-inferior.h.  */
+
+void
+gdb_flush_out_err ()
+{
+  fflush (stdout);
+  fflush (stderr);
+}
+
+/* See server.h.  */
+
+void
+post_fork_inferior (int pid, const char *program)
+{
+#ifdef SIGTTOU
+  signal (SIGTTOU, SIG_IGN);
+  signal (SIGTTIN, SIG_IGN);
+  terminal_fd = fileno (stderr);
+  old_foreground_pgrp = tcgetpgrp (terminal_fd);
+  tcsetpgrp (terminal_fd, pid);
+  atexit (restore_old_foreground_pgrp);
+#endif
+
+  startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED,
+		    &last_status, &last_ptid);
+  current_thread->last_resume_kind = resume_stop;
+  current_thread->last_status = last_status;
+  signal_pid = pid;
+  target_post_create_inferior ();
+  fprintf (stderr, "Process %s created; pid = %d\n", program, pid);
+  fflush (stderr);
+}
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index ab6670b..7fbf744 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1009,7 +1009,7 @@ linux_create_inferior (const char *program,
   new_lwp = add_lwp (ptid);
   new_lwp->must_set_ptrace_flags = 1;
 
-  post_fork_inferior (pid, program, startup_inferior);
+  post_fork_inferior (pid, program);
 
   return pid;
 }
@@ -6058,8 +6058,6 @@ linux_look_up_symbols (void)
 static void
 linux_request_interrupt (void)
 {
-  extern unsigned long signal_pid;
-
   /* Send a SIGINT to the process group.  This acts just like the user
      typed a ^C on the controlling terminal.  */
   kill (-signal_pid, SIGINT);
diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c
index 382d71c..35160d6 100644
--- a/gdb/gdbserver/lynx-low.c
+++ b/gdb/gdbserver/lynx-low.c
@@ -262,7 +262,7 @@ lynx_create_inferior (const char *program,
 		       environ_vector (get_environ ()), lynx_ptrace_fun,
 		       NULL, NULL, NULL, NULL);
 
-  post_fork_inferior (pid, program, startup_inferior);
+  post_fork_inferior (pid, program);
 
   lynx_add_process (pid, 0);
   /* Do not add the process thread just yet, as we do not know its tid.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 5a76927..3ab042d 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -37,7 +37,6 @@
 #include "hostio.h"
 #include <vector>
 #include "common-inferior.h"
-#include "nat/fork-inferior.h"
 #include "job-control.h"
 #include "environ.h"
 
@@ -108,22 +107,6 @@ int program_signals_p;
 
 unsigned long signal_pid;
 
-#ifdef SIGTTOU
-/* A file descriptor for the controlling terminal.  */
-int terminal_fd;
-
-/* TERMINAL_FD's original foreground group.  */
-pid_t old_foreground_pgrp;
-
-/* Hand back terminal ownership to the original foreground group.  */
-
-static void
-restore_old_foreground_pgrp (void)
-{
-  tcsetpgrp (terminal_fd, old_foreground_pgrp);
-}
-#endif
-
 /* Set if you want to disable optional thread related packets support
    in gdbserver, for the sake of testing GDB against stubs that don't
    support them.  */
@@ -133,8 +116,8 @@ int disable_packet_qC;
 int disable_packet_qfThreadInfo;
 
 /* Last status reported to GDB.  */
-static struct target_waitstatus last_status;
-static ptid_t last_ptid;
+struct target_waitstatus last_status;
+ptid_t last_ptid;
 
 char *own_buf;
 static unsigned char *mem_buf;
@@ -258,7 +241,7 @@ target_running (void)
 const char *
 get_exec_wrapper ()
 {
-  return wrapper_argv.size () > 0 ? wrapper_argv.c_str () : NULL;
+  return !wrapper_argv.empty () ? wrapper_argv.c_str () : NULL;
 }
 
 /* See common/common-inferior.h.  */
@@ -280,81 +263,6 @@ get_environ ()
   return our_environ;
 }
 
-/* See nat/fork-inferior.h.  */
-
-void
-prefork_hook (const char *args)
-{
-  if (debug_threads)
-    {
-      debug_printf ("args: %s\n", args);
-      debug_flush ();
-    }
-
-#ifdef SIGTTOU
-  signal (SIGTTOU, SIG_DFL);
-  signal (SIGTTIN, SIG_DFL);
-#endif
-
-  /* Clear this so the backend doesn't get confused, thinking
-     CONT_THREAD died, and it needs to resume all threads.  */
-  cont_thread = null_ptid;
-}
-
-/* See server.h.  */
-
-void
-post_fork_inferior (int pid, const char *program,
-		    ptid_t (*my_startup_inferior) (pid_t pid, int ntraps,
-						   struct target_waitstatus
-						   *mystatus,
-						   ptid_t *myptid))
-
-{
-  /* Number of traps to be expected by startup_inferior.  We always
-     expect at least one trap for the main executable.  */
-  int num_traps = START_INFERIOR_TRAPS_EXPECTED;
-
-#ifdef SIGTTOU
-  signal (SIGTTOU, SIG_IGN);
-  signal (SIGTTIN, SIG_IGN);
-  terminal_fd = fileno (stderr);
-  old_foreground_pgrp = tcgetpgrp (terminal_fd);
-  tcsetpgrp (terminal_fd, pid);
-  atexit (restore_old_foreground_pgrp);
-#endif
-
-  my_startup_inferior (pid, num_traps, &last_status, &last_ptid);
-  current_thread->last_resume_kind = resume_stop;
-  current_thread->last_status = last_status;
-  signal_pid = pid;
-  target_post_create_inferior ();
-  fprintf (stderr, "Process %s created; pid = %d\n", program, pid);
-  fflush (stderr);
-}
-
-/* See nat/fork-inferior.h.  */
-
-void
-postfork_hook (pid_t pid)
-{
-}
-
-/* See nat/fork-inferior.h.  */
-
-void
-postfork_child_hook ()
-{
-  /* This is set to the result of setpgrp, which if vforked, will be
-     visible to you in the parent process.  It's only used by humans
-     for debugging.  */
-  static int debug_setpgrp = 657473;
-
-  debug_setpgrp = gdb_setpgid ();
-  if (debug_setpgrp == -1)
-    perror (_("setpgrp failed in child"));
-}
-
 static int
 attach_inferior (int pid)
 {
@@ -3612,7 +3520,7 @@ captured_main (int argc, char *argv[])
 	      next_arg++;
 	    }
 
-	  if (wrapper_argv.size () > 0)
+	  if (!wrapper_argv.empty ())
 	    {
 	      /* Erase the last whitespace.  */
 	      wrapper_argv.erase (wrapper_argv.end () - 1);
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 96566fe..4de4244 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -149,19 +149,17 @@ extern int in_queued_stop_replies (ptid_t ptid);
 #define ANY_SYSCALL (-2)
 
 /* After fork_inferior has been called, we need to adjust a few
-   signals and call startup_inferior.  This is done here.  PID is the
-   pid of the new inferior, PROGRAM is its name, and
-   MY_STARTUP_INFERIOR is the function that should be called to start
-   the inferior and consume its first events.  In most cases, this
-   function should be "startup_inferior" itself.  */
-extern void post_fork_inferior (int pid, const char *program,
-				ptid_t (*my_startup_inferior)
-				(pid_t pid, int ntraps,
-				 struct target_waitstatus *mystatus,
-				 ptid_t *myptid));
+   signals and call startup_inferior to start the inferior and consume
+   its first events.  This is done here.  PID is the pid of the new
+   inferior and PROGRAM is its name.  */
+extern void post_fork_inferior (int pid, const char *program);
 
 /* Get the 'struct gdb_environ *' being used in the current
    session.  */
 extern struct gdb_environ *get_environ ();
 
+extern target_waitstatus last_status;
+extern ptid_t last_ptid;
+extern unsigned long signal_pid;
+
 #endif /* SERVER_H */
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index c71e8ba..0f770a0 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -27,7 +27,6 @@
 #include <sys/syscall.h>
 #include "filestuff.h"
 #include "hostio.h"
-#include "common-inferior.h"
 #include "nat/fork-inferior.h"
 
 /* Some older glibc versions do not define this.  */
@@ -293,7 +292,7 @@ spu_create_inferior (const char *program,
 		       environ_vector (get_environ ()), spu_ptrace_fun,
 		       NULL, NULL, NULL, NULL);
 
-  post_fork_inferior (pid, program, startup_inferior);
+  post_fork_inferior (pid, program);
 
   proc = add_process (pid, 0);
   proc->tdesc = tdesc_spu;
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index 3f96a6c..307d15a 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -137,12 +137,3 @@ pfildes (gdb_fildes_t fd)
   return plongest (fd);
 #endif
 }
-
-/* See common/common-utils.h.  */
-
-void
-gdb_flush_out_err ()
-{
-  fflush (stdout);
-  fflush (stderr);
-}
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 2a01dd2..af181f0 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -96,7 +96,7 @@ inf_ptrace_create_inferior (struct target_ops *ops,
 			    char **env, int from_tty)
 {
   pid_t pid;
-  ptid_t ptid;  
+  ptid_t ptid;
 
   /* Do not change either targets above or the same target if already present.
      The reason is the target stack is shared across multiple inferiors.  */
diff --git a/gdb/inferior.h b/gdb/inferior.h
index cdaeb11..6376952 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -45,7 +45,6 @@ struct inferior;
 
 #include "progspace.h"
 #include "registry.h"
-#include "common-inferior.h"
 
 #include "symfile-add-flags.h"
 #include "common/refcounted-object.h"
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 7fd93ef..0913409 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -358,9 +358,11 @@ fork_inferior (const char *exec_file_arg, const std::string &allargs,
      state, this doesn't work.  Also note that the vfork(2) call might
      actually be a call to fork(2) due to the fact that autoconf will
      ``#define vfork fork'' on certain platforms.  */
+#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
   if (pre_trace_fun || debug_fork)
     pid = fork ();
   else
+#endif
     pid = vfork ();
 
   if (pid < 0)
@@ -567,3 +569,27 @@ startup_inferior (pid_t pid, int ntraps,
 
   return resume_ptid;
 }
+
+/* See nat/fork-inferior.h.  */
+
+void
+trace_start_error (const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start (ap, fmt);
+  warning ("Could not trace the inferior process.\nError: ");
+  vwarning (fmt, ap);
+  va_end (ap);
+
+  gdb_flush_out_err ();
+  _exit (0177);
+}
+
+/* See nat/fork-inferior.h.  */
+
+void
+trace_start_error_with_name (const char *string)
+{
+  trace_start_error ("%s: %s", string, safe_strerror (errno));
+}
diff --git a/gdb/nat/fork-inferior.h b/gdb/nat/fork-inferior.h
index 39bdd8d..10e3832 100644
--- a/gdb/nat/fork-inferior.h
+++ b/gdb/nat/fork-inferior.h
@@ -87,4 +87,20 @@ extern void postfork_hook (pid_t pid);
    place.  This function is mainly used by fork_inferior.  */
 extern void postfork_child_hook ();
 
+/* Flush both stdout and stderr.  This function needs to be
+   implemented differently on GDB and GDBserver.  */
+extern void gdb_flush_out_err ();
+
+/* Report an error that happened when starting to trace the inferior
+   (i.e., when the "traceme_fun" callback is called on fork_inferior)
+   and bail out.  This function does not return.  */
+extern void trace_start_error (const char *fmt, ...)
+  ATTRIBUTE_NORETURN;
+
+/* Like "trace_start_error", but the error message is constructed by
+   combining STRING with the system error message for errno.  This
+   function does not return.  */
+extern void trace_start_error_with_name (const char *string)
+  ATTRIBUTE_NORETURN;
+
 #endif /* ! FORK_INFERIOR_H */
diff --git a/gdb/utils.c b/gdb/utils.c
index bd0a0d8..c61557e 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -3391,15 +3391,6 @@ strip_leading_path_elements (const char *path, int n)
   return p;
 }
 
-/* See common/common-utils.h.  */
-
-void
-gdb_flush_out_err ()
-{
-  gdb_flush (main_ui->m_gdb_stdout);
-  gdb_flush (main_ui->m_gdb_stderr);
-}
-
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 extern initialize_file_ftype _initialize_utils;
 
-- 
2.5.5



  reply	other threads:[~2017-06-07 12:29 UTC|newest]

Thread overview: 155+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  3:39 [PATCH 0/6] Implement the ability to start inferiors with a shell on gdbserver Sergio Durigan Junior
2016-12-23  3:39 ` [PATCH 2/6] Share parts of gdb/terminal.h with gdbserver Sergio Durigan Junior
2016-12-26 21:35   ` Luis Machado
2017-01-03 21:14     ` Sergio Durigan Junior
2017-01-03 21:27       ` Luis Machado
2017-01-03 21:38         ` Sergio Durigan Junior
2016-12-23  3:39 ` [PATCH 1/6] Share gdb/environ.[ch] " Sergio Durigan Junior
2016-12-26 21:34   ` Luis Machado
2016-12-23  3:39 ` [PATCH 3/6] Share parts of gdb/inflow.c " Sergio Durigan Junior
2016-12-26 21:34   ` Luis Machado
2017-01-03 21:16     ` Sergio Durigan Junior
2016-12-23  3:45 ` [PATCH 5/6] Share fork_inferior et al " Sergio Durigan Junior
2017-01-03 23:32   ` Luis Machado
2017-01-05 20:11     ` Sergio Durigan Junior
2018-02-21  3:58   ` [RFC] "gdbserver ... BASENAME_EXE" no longer works (was: "[PATCH 5/6] Share fork_inferior et al with gdbserver") Joel Brobecker
2018-02-21  6:15     ` [RFC] "gdbserver ... BASENAME_EXE" no longer works Sergio Durigan Junior
2018-02-21  7:37       ` Joel Brobecker
2016-12-23  3:45 ` [PATCH 4/6] Share parts of gdb/gdbthread.h with gdbserver Sergio Durigan Junior
2016-12-26 21:35   ` Luis Machado
2017-01-03 21:31     ` Sergio Durigan Junior
2016-12-23  3:49 ` [PATCH 6/6] Implement proper "startup-with-shell" support on gdbserver Sergio Durigan Junior
2016-12-23  8:07   ` Eli Zaretskii
2017-01-03 20:48     ` Sergio Durigan Junior
2017-01-04 16:08       ` Eli Zaretskii
2017-01-05 20:12         ` Sergio Durigan Junior
2016-12-26 21:34   ` Luis Machado
2017-01-03 21:35     ` Sergio Durigan Junior
2016-12-27  0:26   ` Tom Tromey
2017-01-03 21:32     ` Sergio Durigan Junior
2016-12-23  7:50 ` [PATCH 0/6] Implement the ability to start inferiors with a shell " Eli Zaretskii
2017-01-03 20:23   ` Sergio Durigan Junior
2017-01-18 15:36 ` [PATCH v2] " Sergio Durigan Junior
2017-01-18 15:36   ` [PATCH v2 6/6] Implement proper "startup-with-shell" support " Sergio Durigan Junior
2017-01-18 16:43     ` Eli Zaretskii
2017-02-01 19:07     ` Luis Machado
2017-01-18 15:36   ` [PATCH v2 3/6] Share parts of gdb/inflow.c with gdbserver Sergio Durigan Junior
2017-02-01 18:41     ` Luis Machado
2017-01-18 15:36   ` [PATCH v2 1/6] Share gdb/environ.[ch] " Sergio Durigan Junior
2017-02-01 20:35     ` Luis Machado
2017-01-18 15:36   ` [PATCH v2 2/6] Share parts of gdb/terminal.h " Sergio Durigan Junior
2017-02-01 18:37     ` Luis Machado
2017-02-07 22:39       ` Sergio Durigan Junior
2017-01-18 15:42   ` [PATCH v2 4/6] Share parts of gdb/gdbthread.h " Sergio Durigan Junior
2017-02-01 18:54     ` Luis Machado
2017-02-07 22:42       ` Sergio Durigan Junior
2017-02-08  9:07         ` Luis Machado
2017-01-18 15:44   ` [PATCH v2 5/6] Share fork_inferior et al " Sergio Durigan Junior
2017-02-01 21:39     ` Luis Machado
2017-02-07 22:23       ` Sergio Durigan Junior
2017-01-26 22:47   ` [PATCH v2] Implement the ability to start inferiors with a shell on gdbserver Sergio Durigan Junior
2017-01-27  7:45     ` Eli Zaretskii
2017-01-27 17:59       ` Sergio Durigan Junior
2017-02-08  3:25   ` [PATCH v3 0/6] " Sergio Durigan Junior
2017-02-08  3:25     ` [PATCH v3 2/6] Share parts of gdb/terminal.h with gdbserver Sergio Durigan Junior
2017-02-15 15:54       ` Pedro Alves
2017-02-16 21:37         ` Sergio Durigan Junior
2017-02-08  3:25     ` [PATCH v3 1/6] Share gdb/environ.[ch] " Sergio Durigan Junior
2017-02-15 15:36       ` Pedro Alves
2017-03-07 20:50         ` Sergio Durigan Junior
2017-02-08  3:25     ` [PATCH v3 3/6] Share parts of gdb/inflow.c " Sergio Durigan Junior
2017-02-15 16:02       ` Pedro Alves
2017-02-16 22:06         ` Sergio Durigan Junior
2017-02-08  3:32     ` [PATCH v3 5/6] Share fork_inferior et al " Sergio Durigan Junior
2017-02-15 17:28       ` Pedro Alves
2017-02-16 12:23         ` Philipp Rudo
2017-02-16 12:26           ` Pedro Alves
2017-02-16 12:37             ` Philipp Rudo
     [not found]         ` <87bmtcg91v.fsf@redhat.com>
2017-03-13 15:34           ` Pedro Alves
2017-02-08  3:33     ` [PATCH v3 4/6] Share parts of gdb/gdbthread.h " Sergio Durigan Junior
2017-02-15 16:15       ` Pedro Alves
2017-02-21 21:27         ` Sergio Durigan Junior
2017-02-08  3:33     ` [PATCH v3 6/6] Implement proper "startup-with-shell" support on gdbserver Sergio Durigan Junior
2017-02-08 17:34       ` Eli Zaretskii
2017-02-09  0:02         ` Sergio Durigan Junior
2017-02-17 16:05       ` Pedro Alves
2017-02-17 16:27         ` Eli Zaretskii
2017-03-07 20:59         ` Sergio Durigan Junior
2017-03-13 15:12           ` Pedro Alves
2017-02-13 19:50     ` [PATCH v3 0/6] Implement the ability to start inferiors with a shell " Sergio Durigan Junior
2017-03-08  5:29     ` [PATCH v4 0/5] " Sergio Durigan Junior
2017-03-08  5:29       ` [PATCH v4 5/5] Implement proper "startup-with-shell" support " Sergio Durigan Junior
2017-03-08 15:49         ` Eli Zaretskii
2017-03-13 17:26         ` Pedro Alves
2017-03-08  5:29       ` [PATCH v4 2/5] Share parts of gdb/inflow.c with gdbserver Sergio Durigan Junior
2017-03-08  5:29       ` [PATCH v4 4/5] Share fork_inferior et al " Sergio Durigan Junior
2017-03-13 17:04         ` Pedro Alves
2017-03-17  1:02           ` Sergio Durigan Junior
2017-03-17 10:27             ` Pedro Alves
2017-03-08  5:29       ` [PATCH v4 1/5] Share parts of gdb/terminal.h " Sergio Durigan Junior
2017-03-08  5:29       ` [PATCH v4 3/5] Share parts of gdb/gdbthread.h " Sergio Durigan Junior
2017-03-30  1:50 ` [PATCH v5 0/5] Implement the ability to start inferiors with a shell on gdbserver Sergio Durigan Junior
2017-03-30  1:50   ` [PATCH v5 2/5] Share parts of gdb/gdbthread.h with gdbserver Sergio Durigan Junior
2017-03-31 17:15     ` Pedro Alves
2017-04-07  2:53       ` Sergio Durigan Junior
2017-03-30  1:50   ` [PATCH v5 1/5] Move parts of inferior job control to common/ Sergio Durigan Junior
2017-03-31 17:11     ` Pedro Alves
2017-03-31 17:31       ` Sergio Durigan Junior
2017-03-31 18:21         ` Pedro Alves
2017-03-31 21:20           ` Sergio Durigan Junior
2017-04-07 17:51             ` Pedro Alves
2017-04-12  0:25               ` Sergio Durigan Junior
2017-04-12  1:17                 ` [PATCH] Create gdb_termios.h (and cleanup gdb/{,gdbserver/}terminal.h) Sergio Durigan Junior
2017-04-12 10:28                   ` Pedro Alves
2017-04-12 22:00                     ` Sergio Durigan Junior
2017-03-30  1:50   ` [PATCH v5 3/5] C++-fy and prepare for sharing fork_inferior Sergio Durigan Junior
2017-04-07 18:30     ` Pedro Alves
2017-04-12  0:24       ` Sergio Durigan Junior
2017-04-12  5:04         ` Sergio Durigan Junior
2017-04-12  5:19           ` [obv/commit] Fix build breakage from last commit (window-nat.c:windows_create_inferior) Sergio Durigan Junior
2017-04-12 10:14           ` [PATCH] fork-child.c: Avoid unnecessary heap-allocation / string copying (Re: [PATCH v5 3/5] C++-fy and prepare for sharing fork_inferior) Pedro Alves
2017-04-12 22:26             ` Sergio Durigan Junior
2017-04-13  3:42               ` Pedro Alves
2017-04-13  4:33                 ` Sergio Durigan Junior
2017-04-13 10:51                   ` Pedro Alves
2017-04-13 18:30                     ` Sergio Durigan Junior
2017-04-14  1:03           ` [obv/commit] Fix build breakage on Cygwin (PR gdb/21385) Sergio Durigan Junior
2017-03-30  1:55   ` [PATCH v5 4/5] Share fork_inferior et al with gdbserver Sergio Durigan Junior
2017-03-30  1:55   ` [PATCH v5 5/5] Implement proper "startup-with-shell" support on gdbserver Sergio Durigan Junior
2017-05-04  5:31 ` [PATCH v6 0/4] Implement the ability to start inferiors with a shell " Sergio Durigan Junior
2017-05-04  5:32   ` [PATCH v6 1/4] Move parts of inferior job control to common/ Sergio Durigan Junior
2017-05-04  5:32   ` [PATCH v6 2/4] Share parts of gdb/gdbthread.h with gdbserver Sergio Durigan Junior
2017-05-05 19:04     ` Pedro Alves
2017-05-06 14:15       ` Sergio Durigan Junior
2017-05-04  5:32   ` [PATCH v6 3/4] Share fork_inferior et al " Sergio Durigan Junior
2017-05-05 19:05     ` Pedro Alves
2017-05-31  3:43       ` Sergio Durigan Junior
2017-06-07 10:16         ` Pedro Alves
2017-06-07 12:23           ` Pedro Alves
2017-06-07 21:01             ` Sergio Durigan Junior
2017-06-07 21:06               ` Pedro Alves
2017-06-07 21:00           ` Sergio Durigan Junior
2017-05-04  5:38   ` [PATCH v6 4/4] Implement proper "startup-with-shell" support on gdbserver Sergio Durigan Junior
2017-05-05 19:21     ` Pedro Alves
2017-06-04 22:18 ` [PATCH v7 0/4] Implement the ability to start inferiors with a shell " Sergio Durigan Junior
2017-06-04 22:18   ` [PATCH v7 2/4] Share parts of gdb/gdbthread.h with gdbserver Sergio Durigan Junior
2017-06-04 22:18   ` [PATCH v7 3/4] Share fork_inferior et al " Sergio Durigan Junior
2017-06-07 12:29     ` Pedro Alves [this message]
2017-06-07 21:06       ` Sergio Durigan Junior
2017-06-07 21:41         ` Sergio Durigan Junior
2017-06-07 22:05           ` Pedro Alves
2017-06-07 22:08             ` Sergio Durigan Junior
2017-06-07 22:14               ` Pedro Alves
2017-06-07 22:15         ` Sergio Durigan Junior
2017-06-07 22:29           ` Pedro Alves
2017-06-08  0:00             ` Sergio Durigan Junior
2019-02-14 15:38               ` Thomas Schwinge
2017-06-08 16:40     ` Yao Qi
2017-06-08 18:49       ` Sergio Durigan Junior
2017-06-08 21:02       ` [commit/obvious] Fix possible bug when no args have been provided to the executable Sergio Durigan Junior
2017-06-09 22:19       ` [commit/obvious] Include <signal.h> on gdbserver/fork-child.c (and fix regressions) Sergio Durigan Junior
2017-06-21 17:01     ` [PATCH v7 3/4] Share fork_inferior et al with gdbserver Simon Marchi
2017-06-21 17:19       ` Sergio Durigan Junior
2017-06-04 22:18   ` [PATCH v7 4/4] Implement proper "startup-with-shell" support on gdbserver Sergio Durigan Junior
2017-06-05  2:31     ` Eli Zaretskii
2017-06-04 22:18   ` [PATCH v7 1/4] Move parts of inferior job control to common/ Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e012ef6-587b-5883-0626-9f6dbb33d60f@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox