From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HXr+AF6a6moV9RIAWB0awg (envelope-from ) for ; Tue, 03 Nov 2026 21:37:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1793759837; bh=COg/bU8qmPjAnwJM0ykAYJdOPNaLNLawqtKssA9PCd0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SBWxDaLIlCShQjiQBd3Fb5ITxwWIAYmXQ0MZFEVK9J46e8NqM2bgwJPfaiEpAnz4C Y0uG+KoGYzxf+x8C3AsOBHFlgET/UG52YXZIXCYbBGuGpquX1BauWuB67Yl7W4s5/Q Gsb1MQ4TN/fcEbZbNu3BaJqKAc9q5R84EXptUfVw= Received: by simark.ca (Postfix, from userid 112) id E8F4B378002; Tue, 03 Nov 2026 21:37:17 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=FJpMN3RR; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 24A2E1E043 for ; Tue, 03 Nov 2026 21:37:17 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A9174BA79B4 for ; Wed, 4 Nov 2026 02:37:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A9174BA79B4 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=FJpMN3RR Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A27F04BA23E9 for ; Wed, 4 Nov 2026 02:36:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A27F04BA23E9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A27F04BA23E9 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793759811; cv=none; b=jeOFlRRH+DQZhiO04fenN4Fnld4fTEQeChKEg6KbJPAIr1jvuVrcRObO1orO2L9fpM84irCV7gE1Cs8H5tgvXiXOwI4LL2mNZ6g5eSy5amomYcggcGP+gvEpzrbjaHe6n+ZsZwMdJbjQHQjNFCCD1lmt5s4ddlGmH7/4ZpTbiXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793759811; c=relaxed/simple; bh=COg/bU8qmPjAnwJM0ykAYJdOPNaLNLawqtKssA9PCd0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=nLwLt+e43vAnzi+Su23WzakoidcNBu81D2zBUHRFoblPiyPXjfJsjQCLxuycs6arYYmVoDojwwH9FRWyW/Jmw+j79KQzhw/q1zri46pUBGRyq7flapvOsihBt4QUG4U0oCjJwQQOweSj9gzD09BQMD3Lm1VlSnZZX5FE8sZY3+4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=FJpMN3RR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A27F04BA23E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1793759809; bh=COg/bU8qmPjAnwJM0ykAYJdOPNaLNLawqtKssA9PCd0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FJpMN3RRUi3ju9hqW79wmkAevK1Xc/2+uaSdBpoqz4456sgfXQW0Xa8RiaZH74fDh ODB8/7f0Ku+wEOdV17u4qjdvDDakjc4APnCrQu5cwDGORh9Fw8zvm/lWaTlR2012Ke J5PDnRCmjw6MndNWaBRwKpSNcQ23UIT9za147xr8= Received: by simark.ca (Postfix) id 671A71E043; Tue, 03 Nov 2026 21:36:49 -0500 (EST) Message-ID: <932ebaa5-9fe6-48bc-b439-0455bf65f22c@simark.ca> Date: Tue, 3 Nov 2026 21:36:48 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] gdb/testsuite: add support for running tests using QEMU To: Jan Vrany , Tom Tromey Cc: gdb-patches@sourceware.org References: <20261027135827.3868769-1-jan@vrany.io> <87qzh17lqo.fsf@tromey.com> <8ff29932-a26d-4f95-8a9a-faaa4210b809@simark.ca> <75cc3bcfcbf89512070df156461210a721e35e17.camel@vrany.io> Content-Language: en-US From: Simon Marchi In-Reply-To: <75cc3bcfcbf89512070df156461210a721e35e17.camel@vrany.io> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 2026-11-03 15:43, Jan Vrany wrote: > On Tue, 2026-11-03 at 15:34 -0500, Simon Marchi wrote: >> On 11/3/26 2:34 PM, Tom Tromey wrote: >>>>>>>> "Jan" == Jan Vrany writes: >>> >>> Jan> + set portnum [expr {1024+round(rand()*(65535-1024))}] >>> [...] >>> >>> I wonder if you considered using unix domain sockets instead. >>> >>> https://qemu-project.gitlab.io/qemu/system/gdb.html#using-unix-sockets >>> >>> With these I think you could pick the names, and more or less avoid >>> clashes by construction. >> >> I suppose that this board file is not relevant for Windows? If so, then >> it would be a good idea to try using unix sockets. > > I do not think we can use sockets here as this patch is using user-mode qemu, > not system qemu. Seems to work by just passing a path to -g: $ qemu-arm -cpu cortex-a15 -g /tmp/qemu-gdb.sock ./bitpiece & [1] 1783149 $ file /tmp/qemu-gdb.sock /tmp/qemu-gdb.sock: socket $ ~/build/binutils-gdb-all-targets/gdb/gdb -nx -q --data-directory=/home/simark/build/binutils-gdb-all-targets/gdb/data-directory -ex "tar rem /tmp/qemu-gdb.sock" -ex "b main" -ex c Remote debugging using /tmp/qemu-gdb.sock Reading symbols from /tmp/foo/bitpiece... This GDB supports auto-downloading debuginfo from the following URLs: Enable debuginfod for this session? (y or [n]) n Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. _start () at bitpiece.c:13 13 __asm__ volatile("bl main\n\tmov r7, #1\n\tsvc #0"); Breakpoint 1 at 0x20164: file bitpiece.c, line 8. Continuing. Breakpoint 1, main () at bitpiece.c:8 8 use(in[0], in[1], in[2], in[3]); (gdb) bt #0 main () at bitpiece.c:8