From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16210 invoked by alias); 28 Feb 2004 18:06:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16203 invoked from network); 28 Feb 2004 18:06:27 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 28 Feb 2004 18:06:27 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ax8r5-0004MR-Gq for ; Sat, 28 Feb 2004 13:06:27 -0500 Date: Sat, 28 Feb 2004 18:06:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: [patch/gdbserver] Be slightly more verbose Message-ID: <20040228180627.GA16692@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00843.txt.bz2 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 * 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. */