From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lb3-smtp-cloud7.xs4all.net (lb3-smtp-cloud7.xs4all.net [194.109.24.31]) by sourceware.org (Postfix) with ESMTPS id 314CD38930FF for ; Sat, 19 Dec 2020 14:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 314CD38930FF Received: from popmini.vanrein.org ([83.161.146.46]) by smtp-cloud7.xs4all.net with ESMTP id qdZikG7TIur0eqdZjkZakP; Sat, 19 Dec 2020 15:51:16 +0100 Received: by fame.vanrein.org (Postfix, from userid 1006) id B748B437F2; Sat, 19 Dec 2020 14:51:05 +0000 (UTC) Received: from airhead.local (phantom.vanrein.org [83.161.146.46]) by fame.vanrein.org (Postfix) with ESMTPA id 7CCAC437F0; Sat, 19 Dec 2020 14:51:02 +0000 (UTC) Message-ID: <5FDE1353.9030700@openfortress.nl> Date: Sat, 19 Dec 2020 15:50:59 +0100 From: Rick van Rein User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: gdb@sourceware.org Subject: howto? gdb --> AF_UNIX --> gdbserver X-Enigmail-Version: 1.2.3 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: MS4xfH7jJcHyY5ciBlh2Of+5BLlohs33ZekOj+S11joQ86LZiIYQfO8Budtt3dLHaada9UpOJdUEUGNNlGhCBb/9DiYxFnF0OxvimO++E4PTHEcWA5fRiKqS DSEF3p6KNWr7w+IuNhv5s4Z6tl5DyEwdoPluXwERYt6MV6TS3GciWbLajsoOtIPj6WxtpmIzMKgTYN20Ry+0IPgRPXrcvGIGsp0= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Sat, 19 Dec 2020 14:51:21 -0000 Hello, Our project uses a test program [0][1] that automatically runs and connects test processes. It would be useful to debug one or more of these in their connected context. The best match would be to use a socket file name relative to the testdir, rather than a numeric port shared with the entire host. * 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. * 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. * The automated tests might benefit from the reverse approach; try to start gdbserver when it can connect to the UNIX domain socket of the host, and if not continue with exec() to run the process without debugger. This is not how things seem to work, judging from the sparse documentation. * In all cases, both the syntax and available features are unclear and I am confused after trying the things I can imagine; does a socket need a prefix "unix:" or "unix::" or does it figure it all out? An example flow could be really useful... The documentation about gdb and gdbserver is not really helping in answering these questions. May I suggest extending it? Happy to proof-read or, once understood, write some proze that would have helped me. Thanks! -Rick [0] https://gitlab.com/arpa2/kip/-/blob/initial/PYPELINE.MD [1] https://gitlab.com/arpa2/kip/-/blob/initial/test/pypeline