Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: [patch/gdbserver] Be slightly more verbose
Date: Sat, 28 Feb 2004 18:06:00 -0000	[thread overview]
Message-ID: <20040228180627.GA16692@nevyn.them.org> (raw)

These patches normalize gdbserver's output in a couple of cases.  Now, for
both normal and attach operation, and for both serial and TCP operation,
gdbserver will print out one line of output before it is ready for input
and another line of output after it is ready for input, without blocking.
This lets me update the test harness to not issue "target remote" until
gdbserver is actually ready for a connection; on very slow targets, like the
one I've been using all week, this can prevent time-consuming retries.
No change in testsuite results, just a nice change in testsuite run time.

Will commit in a bit.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-02-28  Daniel Jacobowitz  <drow@mvista.com>

	* remote-utils.c (remote_open): Print a status notice after
	opening a TCP port.
	* server.c (attach_inferior): Print a status notice after
	attaching.

Index: gdb/gdbserver/remote-utils.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/gdbserver/remote-utils.c,v
retrieving revision 1.17
diff -u -p -r1.17 remote-utils.c
--- gdb/gdbserver/remote-utils.c	5 Jun 2003 14:26:58 -0000	1.17
+++ gdb/gdbserver/remote-utils.c	27 Feb 2004 20:54:11 -0000
@@ -135,6 +135,8 @@ remote_open (char *name)
 	  || listen (tmp_desc, 1))
 	perror_with_name ("Can't bind address");
 
+      fprintf (stderr, "Listening on port %d\n", port);
+
       tmp = sizeof (sockaddr);
       remote_desc = accept (tmp_desc, (struct sockaddr *) &sockaddr, &tmp);
       if (remote_desc == -1)
Index: gdb/gdbserver/server.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/gdbserver/server.c,v
retrieving revision 1.16
diff -u -p -r1.16 server.c
--- gdb/gdbserver/server.c	13 Oct 2003 16:17:21 -0000	1.16
+++ gdb/gdbserver/server.c	28 Feb 2004 03:06:13 -0000
@@ -70,6 +70,8 @@ attach_inferior (int pid, char *statuspt
   if (myattach (pid) != 0)
     return -1;
 
+  fprintf (stderr, "Attached; pid = %d\n", pid);
+
   /* FIXME - It may be that we should get the SIGNAL_PID from the
      attach function, so that it can be the main thread instead of
      whichever we were told to attach to.  */


             reply	other threads:[~2004-02-28 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28 18:06 Daniel Jacobowitz [this message]
2004-02-29 16:46 ` Daniel Jacobowitz

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=20040228180627.GA16692@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.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