From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40721 invoked by alias); 31 Aug 2018 15:10:16 -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 40704 invoked by uid 89); 31 Aug 2018 15:10:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.156) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Aug 2018 15:10:13 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 7AED22ACE for ; Fri, 31 Aug 2018 10:10:12 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id vl36fsTixBcCXvl3ZfMDyg; Fri, 31 Aug 2018 10:10:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ad2Gi+/TlvVb8huArgztYe2dZF+UxK7w/F+YiH2S790=; b=ZU7S1oC1lf6eq6e5tliwg6tmMj DErGgnY5ryKIcgmkm1/EoXTjj3gq4BOHr6Om592gMeBibK6MxD0aCocrVnAF7pTsGcoivlTQ3JvFe XwxP3vU1q7o0rLOe+yQ2WFf5V; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:58162 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fvl36-000GWg-Fq; Fri, 31 Aug 2018 10:09:24 -0500 From: Tom Tromey To: John Darrington Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Allow remote debugging over a local domain socket References: <874lfd5gjt.fsf@tromey.com> <20180831101818.9175-1-john@darrington.wattle.id.au> Date: Fri, 31 Aug 2018 15:10:00 -0000 In-Reply-To: <20180831101818.9175-1-john@darrington.wattle.id.au> (John Darrington's message of "Fri, 31 Aug 2018 12:18:18 +0200") Message-ID: <875zzq1skc.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-08/txt/msg00862.txt.bz2 >>>>> "John" == John Darrington writes: John> Extend the "target remote" and "target extended-remote" commands John> such that if the filename provided is a unix domain (AF_UNIX) John> socket, then it'll be treated as such, instead of trying to open John> it as if it were a character device. Thanks for the patch. This looks essentially reasonable to me. John> +/* Open a AF_UNIX socket. */ John> +int John> +socket_open (struct serial *scb, const char *name) John> +{ It seems to me that all the functions in this file could be static. This might necessitate wrapping many of them in "#ifndef USE_WIN32API" to avoid warnings about unused code, but that seems like an improvement as well. John> +int John> +ser_socket_send_break (struct serial *scb) John> +{ John> + /* Send telnet IAC and BREAK characters. */ John> + return (serial_write (scb, "\377\363", 2)); John> +} I don't really know what's expected here, but is this correct? John> diff --git a/gdb/ser-socket.h b/gdb/ser-socket.h John> new file mode 100644 John> index 0000000000..58509302d6 John> --- /dev/null John> +++ b/gdb/ser-socket.h You could just drop this file entirely. Tom