From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46779 invoked by alias); 31 Aug 2018 15:12:55 -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 46770 invoked by uid 89); 31 Aug 2018 15:12:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1619 X-HELO: jocasta.intra Received: from de.cellform.com (HELO jocasta.intra) (88.217.224.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Aug 2018 15:12:53 +0000 Received: from jocasta.intra (localhost [127.0.0.1]) by jocasta.intra (8.15.2/8.15.2/Debian-8) with ESMTPS id w7VFCoa8012217 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Aug 2018 17:12:51 +0200 Received: (from john@localhost) by jocasta.intra (8.15.2/8.15.2/Submit) id w7VFCoqj012216; Fri, 31 Aug 2018 17:12:50 +0200 Date: Fri, 31 Aug 2018 15:12:00 -0000 From: John Darrington To: Tom Tromey Cc: John Darrington , gdb-patches@sourceware.org Subject: Re: [PATCH] Allow remote debugging over a local domain socket Message-ID: <20180831151250.6uehwrqcbkh6pzkp@jocasta.intra> References: <874lfd5gjt.fsf@tromey.com> <20180831101818.9175-1-john@darrington.wattle.id.au> <875zzq1skc.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875zzq1skc.fsf@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-08/txt/msg00867.txt.bz2 On Fri, Aug 31, 2018 at 09:09:23AM -0600, Tom Tromey wrote: >>>>> "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. Thanks 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. OK 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? I wondererd about that too. This bit I copied from the ser-tcp.c file. 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. OK. -- Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key.