From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32395 invoked by alias); 13 Mar 2002 19:09:53 -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 32312 invoked from network); 13 Mar 2002 19:09:49 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 13 Mar 2002 19:09:49 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 45CDE59D34A; Wed, 13 Mar 2002 20:09:49 +0100 (CET) Received: from suse.cz (leviathan.suse.cz [10.20.1.56]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g2DJ9mp18796; Wed, 13 Mar 2002 20:09:48 +0100 X-Authentication-Warning: chimera.suse.cz: Host leviathan.suse.cz [10.20.1.56] claimed to be suse.cz Message-ID: <3C8FA3FC.6040106@suse.cz> Date: Wed, 13 Mar 2002 11:09:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Andreas Schwab Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] remote debugging patches References: <3C8BA71F.20807@suse.cz> <20020310143517.B3933@nevyn.them.org> <3C8BB74D.90705@suse.cz> <20020310173046.C9299@nevyn.them.org> <3C8CC514.4010207@suse.cz> <3C8D6646.8030809@cygnus.com> <20020311214743.B462@nevyn.them.org> <3C8F5EA6.9050909@suse.cz> <3C8F7B9A.9050002@suse.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00202.txt.bz2 Andreas Schwab wrote: > Maybe it's just me, but I hate arbitrary limits. There is no need for > sprintf at this point anyway. I'd suggest to define another variable that > either points to name or to the result of inet_ntoa and use that in the > fprintf call. No need for namebuf either. OK, the 100-chars limit is removed and the patch is getting smaller and smaller :-)) Do you like it more this way, Andreas? Index: gdbserver/remote-utils.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/remote-utils.c,v retrieving revision 1.8 diff -c -3 -p -B -b -r1.8 remote-utils.c *** remote-utils.c 2002/02/14 06:21:22 1.8 --- remote-utils.c 2002/03/13 19:05:33 *************** remote_open (char *name) *** 99,105 **** } #endif ! } else { --- 99,105 ---- } #endif ! fprintf (stderr, "Remote debugging using %s\n", name); } else { *************** remote_open (char *name) *** 154,159 **** --- 154,163 ---- signal (SIGPIPE, SIG_IGN); /* If we don't do this, then gdbserver simply exits when the remote side dies. */ + + /* Convert IP address to string. */ + fprintf (stderr, "Remote debugging from host %s\n", + inet_ntoa (sockaddr.sin_addr)); } #if defined(F_SETFL) && defined (FASYNC) *************** remote_open (char *name) *** 164,170 **** #endif #endif disable_async_io (); - fprintf (stderr, "Remote debugging using %s\n", name); } void --- 168,173 ----