From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29033 invoked by alias); 19 Oct 2018 20:45:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28726 invoked by uid 89); 19 Oct 2018 20:45:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=237A, 7628, 0287, 31F4 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Oct 2018 20:45:16 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 12F59CA37B; Fri, 19 Oct 2018 20:45:15 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAC6C6C1FD; Fri, 19 Oct 2018 20:45:14 +0000 (UTC) From: Sergio Durigan Junior To: John Darrington Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/4] GDB: Fix documentation for invoking GDBSERVER References: <20181013175801.2670-1-john@darrington.wattle.id.au> <20181013175801.2670-3-john@darrington.wattle.id.au> <871s8nxaoj.fsf@redhat.com> <20181019070549.6zu5fcdftmefqtzs@jocasta.intra> Date: Fri, 19 Oct 2018 20:45:00 -0000 In-Reply-To: <20181019070549.6zu5fcdftmefqtzs@jocasta.intra> (John Darrington's message of "Fri, 19 Oct 2018 09:05:49 +0200") Message-ID: <87zhv9vf6t.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00439.txt.bz2 On Friday, October 19 2018, John Darrington wrote: > On Thu, Oct 18, 2018 at 04:27:24PM -0400, Sergio Durigan Junior wrote: > On Saturday, October 13 2018, John Darrington wrote: > > > The documentation did not mention the possibility of invoking gdbserver > > with the new connection forms such as tcp6:host:port. This change fixes > > that. > > Thanks for the patch. > > As I mentioned while reviewing patch #1, there is a reason why gdbserver > doesn't accept prefixes (which means that there isn't a mistake in the > docs). If you go with my suggestion and implement just the support for > the "unix:" prefix, then this patch will need to be changed because it > still won't be correct to mention the "tcp" prefixes. > > Thanks for the reviews. > > How about instead, we just add a test to print an error/warning if > someone tries to start gdbserver with a udp prefix? Hm, I thought about that while writing the email, but at the time it didn't seem like a good option. However, thinking about it again, I think it would be mostly fine. I guess it's OK to support the "tcp{,6}:" prefixes. The check needs to implemented on gdbserver/remote-utils.c:remote_open, and gdbserver needs to error out if "hint.ai_protocol == IPPROTO_UDP". And "parse_connection_spec_without_prefix" could be merged with "parse_connection_spec". Aside from the documentation, you'd also probably have to update the tests (both the selftests and the regular ones). Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/