From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30584 invoked by alias); 13 Mar 2002 14:14:06 -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 30524 invoked from network); 13 Mar 2002 14:14:00 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 13 Mar 2002 14:14:00 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 48AF159D34A; Wed, 13 Mar 2002 15:13:59 +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 g2DEDwp26080; Wed, 13 Mar 2002 15:13:59 +0100 X-Authentication-Warning: chimera.suse.cz: Host leviathan.suse.cz [10.20.1.56] claimed to be suse.cz Message-ID: <3C8F5EA6.9050909@suse.cz> Date: Wed, 13 Mar 2002 06:14: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: Daniel Jacobowitz Cc: Andrew Cagney , 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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00189.txt.bz2 Daniel Jacobowitz wrote: > Michal, are you OK with just the IP address? Sure I am :-) Patch follows... Is it OK? Index: ChangeLog * remote-utils.c (remote_open): Print remote-side's IP address when remote debugging over the network. Index: remote-utils.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/remote-utils.c,v retrieving revision 1.8 diff -c -3 -p -r1.8 remote-utils.c *** remote-utils.c 2002/02/14 06:21:22 1.8 --- remote-utils.c 2002/03/13 14:11:16 *************** static int remote_desc; *** 47,53 **** void remote_open (char *name) { ! int save_fcntl_flags; if (!strchr (name, ':')) { --- 47,56 ---- void remote_open (char *name) { ! int save_fcntl_flags, via_network=0;; ! char namebuf[100]; ! ! snprintf(namebuf, 100, "%s", name); if (!strchr (name, ':')) { *************** remote_open (char *name) *** 154,159 **** --- 157,166 ---- signal (SIGPIPE, SIG_IGN); /* If we don't do this, then gdbserver simply exits when the remote side dies. */ + + /* Convert IP address to string. */ + snprintf (namebuf, 100, "%s", inet_ntoa (sockaddr.sin_addr.s_addr)); + via_network = 1; } #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 --- 171,179 ---- #endif #endif disable_async_io (); ! ! fprintf (stderr, "Remote debugging %s %s\n", ! via_network ? "from host" : "using", namebuf); } void Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz