From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kNHFA2DH4V8fcQAAWB0awg (envelope-from ) for ; Tue, 22 Dec 2020 05:16:00 -0500 Received: by simark.ca (Postfix, from userid 112) id 01FF71F0AA; Tue, 22 Dec 2020 05:15:59 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 197961E552 for ; Tue, 22 Dec 2020 05:15:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 025CA383E82A; Tue, 22 Dec 2020 10:15:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 025CA383E82A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608632157; bh=kNsFAqsYoTmt3vcR4swMvZ5Vl5Ml+QOlbPUiNJLix7Y=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=pK0UOfAetGSc7XICPvjvZINlAP/XWZ3vR2FflvCmKgAW4GNdZvlBXJV67OeO7tFCM T5jRWNEkrskKBephQUpbYQctkn9lb0c6TfGQbhU5aV9SVZQQJbzqGRLY9FoG+LNIp+ FigmXfcUWUAszD81AHFhqgbxmnNfAxLBtuozHdP4= Received: from lb2-smtp-cloud7.xs4all.net (lb2-smtp-cloud7.xs4all.net [194.109.24.28]) by sourceware.org (Postfix) with ESMTPS id 9C90338708A4 for ; Tue, 22 Dec 2020 10:15:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9C90338708A4 Received: from popmini.vanrein.org ([83.161.146.46]) by smtp-cloud7.xs4all.net with ESMTP id rehpkXN1uur0erehqkgtGD; Tue, 22 Dec 2020 11:15:50 +0100 Received: by fame.vanrein.org (Postfix, from userid 1006) id 44D5743B64; Tue, 22 Dec 2020 10:15:43 +0000 (UTC) Received: from airhead.local (phantom.vanrein.org [83.161.146.46]) by fame.vanrein.org (Postfix) with ESMTPA id D64AA43B55; Tue, 22 Dec 2020 10:15:39 +0000 (UTC) Message-ID: <5FE1C749.4030506@openfortress.nl> Date: Tue, 22 Dec 2020 11:15:37 +0100 User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: Martin Simmons Subject: Re: howto? gdb --> AF_UNIX --> gdbserver References: <5FDE1353.9030700@openfortress.nl> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bogosity: Unsure, tests=bogofilter, spamicity=0.520000, version=1.2.4 X-CMAE-Envelope: MS4xfCexvrHKjwxvHmOpytBvRb39oCIYvrdkn7MJThlsKClIsEHIp82luldW+7EOfkdaBCevHqBexntzEfejV2g93rV+qIKr+1W4Sh9wZSROXfromXlAPt2N mTTe4kmM297SqPXwrWkev/jqDCwUtbPpN3WO9WlIOgYOQtAq9IEsCti0JNDXJzMwH5DHmJQgQfcUMpwdTj6KeLiHYDgt7Gba1+c= X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Rick van Rein via Gdb Reply-To: Rick van Rein Cc: gdb@sourceware.org Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" Hi Martin / GDB, Turns out, I was quite right to complain about missing documentation. I think it is useful if this would be fixed. >> * I cannot figure out how to tell gdbserver to listen to a UNIX domain >> socket at a given filename. I would expect it to listen, like it does >> for TCP sockets, but it complains that the name is missing. > > You can't do this with gdbserver itself, but you can wrap it with nc, > e.g. > > rm $unix-domain-socket > nc -Ul -e "gdbserver --no-startup-with-shell stdio $program-to-debug" $unix-domain-socket Thanks, that really cleared up the problem. You are using another flavour or netcat than the two I have :) but at least it is clear that gdbserver does not really align with gdb when it comes to UNIX domain sockets. Surprising, but good to at least know. I was really confused, especially because it is so surprising / unlogical. This really is completely underdocumented, and that is a problem, I think. The same goes for the --multi mode, which I worked out by trying, but it is not clear at all from the documentation. I had to fiddle around to find out that it takes only one connection at a time, and so could not debug a couple of processes in parallel, in whatever way, as the --multi option might be interpreted. >> * Using gdb with "target remote", the same thing seems to happen; it >> seems to want a pre-existing UNIX domain socket. This _is_ in line with >> the TCP style of connecting. > > Yes, if the argument to "target remote" is an existing UNIX domain > socket name then gdb will connect to it. That makes sense on its own; because that it is what it does with TCP also. -Rick