From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ep2sGVj0nmp7zjQAWB0awg (envelope-from ) for ; Mon, 07 Sep 2026 13:28:56 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=starynkevitch.net header.i=@starynkevitch.net header.a=rsa-sha256 header.s=gm1 header.b=BK0qMy+i; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 501761E09E; Mon, 07 Sep 2026 13:28:56 -0400 (EDT) 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 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 2D9461E033 for ; Mon, 07 Sep 2026 13:28:55 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 433AD48F8A48 for ; Mon, 7 Sep 2026 17:28:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 433AD48F8A48 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=starynkevitch.net header.i=@starynkevitch.net header.a=rsa-sha256 header.s=gm1 header.b=BK0qMy+i Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by sourceware.org (Postfix) with ESMTPS id B95FC4BA2E1B for ; Mon, 7 Sep 2026 17:28:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B95FC4BA2E1B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=starynkevitch.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=starynkevitch.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B95FC4BA2E1B Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:4b98:dc4:8::224 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788802101; cv=none; b=Lr/t5X49g09ieXtYITFynIRmhlpSPiTs16t6tYHhSgAuptPf0mRSmauhkZtK8OwKjbi/Hszvf2lOK4FJjQYwZkfevKncQb2Xavy4QfroJEK4IPy2ZOYG7F43sarPsmsff4aObyp8xzXEfwi8ndQeEVxZwTXkhACX7PBwNzezcs4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788802101; c=relaxed/simple; bh=k1O18d1NsNzMUeyBgShOAiBcd+i4GfqmQSuTA6Deqc0=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=N/EIECAifjEMtX/cdFOLlZnsuXuRN1zZDvACD7FMjf0leQ/ATGvIULkcnjMDDQsbg9hQasGDfHjRvUMMNIDxz/tmasksSWkDDmhzqXe2YwA5UpsfaFpY9CSco11Ty7d2f23CYbrofWz+2RQwodT9FNE8LaJv2Wk/3jdOHO5eSt4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=starynkevitch.net header.i=@starynkevitch.net header.a=rsa-sha256 header.s=gm1 header.b=BK0qMy+i DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B95FC4BA2E1B Received: by mail.gandi.net (Postfix) with ESMTPSA id 46E763EE39; Mon, 7 Sep 2026 17:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starynkevitch.net; s=gm1; t=1788802097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lXHlbMRXlMiJHWz5reQykJZjMb8N771P/yBrbg+MI8M=; b=BK0qMy+iiBBo1wG7n8gZsgqncKQ5zo9sVXfaf7pXDf7XjHimg3tiSaHa35D8Wy6qV/3M4A 2SqEKcdMUUyyC0L76ltUubx3XAFslc4V+Kz+2887oeVY2wdWeURQ4Gn8WH3YK/opAX2QG7 mv8dT1xqzGEw4bnRMSfBum96tAgHIFTnDPdOyLD2awZvfOcZilj6/k6tBgCCjxQC80WAoO riH6PN+rmrl9ZTRHb5PbEjM5BTDHlS9k2dvWLiAtJYI6d62bLkP4hm2snDsDhZHC+Hlf7a 0Qn75B/LNjW7maowAJ7rDdFn963fAhN7besrlfTE9ohgNqyao7z0eLUtgGUuLQ== Message-ID: <35c52ee346c8f6a2e6f6c9193725c3c022397498.camel@starynkevitch.net> Subject: Re: Adding architecture-specific commands in GDB From: Basile STARYNKEVITCH To: Andrew Burgess , Matthieu Longo , gdb@sourceware.org Cc: b.starynkevitch@gmail.com Date: Mon, 07 Sep 2026 19:28:16 +0200 In-Reply-To: <87ldc3or1h.fsf@redhat.com> References: <077b9f00-ec84-440f-a84a-d804815aa77e@arm.com> <87ldc3or1h.fsf@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-10+b1 MIME-Version: 1.0 X-GND-Sasl: basile@starynkevitch.net X-GND-Cause: dmFkZTF6dPSx4Ap0HQukcqOdZMDKu1o5Bp2fQrn43Q0tukk2Vw8D+4f6BwsITsrYXodAJcRwPZtAd+TS/cMSaLJeFiiADZOId3sN6HpsYkNHqSLL7hJy83NntFaOPjDXy6DHqLS/JcpBQ6NFkU/d35javOCwCdWV7srIwCZpdurgf4hCBvQTojpMg6R/hPhx4lESCG4HXjtmiYjyl3t5V+nzCU2QCRhcRc+x/u1cFblbGasROW0RlRQN/86EIXsWKOTs4n2ENVtrnx9NKBvZfehmQZ9IXDy3u/h/+nEOyGU2S+yuMfaw0y9oz9BNuEIBKBFjG8JAyVIEWGUOZlAs+r6/4xcYpHgfw8zfKO72Hnw+EXtj3/F5791PpKVzo/6iEgH55h/rGhiuFRm7cmTZj870lWgH2wqIJ3RJcQMyvgStbP6QgTDSI2R8wZ+hwTHVPmBjez8+mUxsW3rJ9IivA+3NBEKyvfinU6dbVUnDw1DEJ6NuU98IGdQPvYv6tUWNr8afB71KZOo2hZB1cNK60T/XZkQpOotWuCIYyuhU9odMRmdNrU1XUAwvBPpzRmll680Kddct1mXKCuIr8qHv2KrRuXj+Rt9EMekP6ZUIITLRiaPTpDXCjLox+otHogY/yX5guJKDm8OB3tgEMTleJcdnFgnOC6GPUBxhpGxLXpSNXY/LkA X-GND-State: clean X-GND-Score: -100 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Wed, 2026-06-24 at 17:13 +0100, Andrew Burgess via Gdb wrote: > Matthieu Longo via Gdb writes: >=20 > > Hi all, > >=20 > > Today, GDB seems to support architecture-specific commands for > > show/set [1]. However, it is not > > clear to me whether any commands beyond the scope of show/set > > can/should be easily added. > >=20 > > My usecase consists in adding AArch64-specific commands to dump > > some tables and permissions set up > > by the Linux kernel. GNU GDB is both open source and extensible with Python So the hard way is to patch the source code of GDB (mostly C) The easy way might be (if you are less allergic to Python than I am) to write Python extensions to GDB https://www.pythonsheets.com/notes/appendix/python-gdb.html https://sourceware.org/gdb/current/onlinedocs/gdb.html/Extending-GDB.html#E= xtending-GDB I (Basile S.) personally prefer GNU guile to Python and GDB can be extended using GN=C2=A7U guile https://sourceware.org/gdb/current/onlinedocs/gdb.html/Guile.html#Guile Of course, both Python and GNU guile are interpreters and in some cases (think of dozen of watchpoints) GDB becomes slow. I even dream of future GDB accepting open source plugins (coded in C and dlopen-ed on Linux), like the GCC compiler already does: https://arxiv.org/abs/1109.0779 https://gcc.gnu.org/onlinedocs/gccint/Plugins.html Sadly, I don't have the skills to implement them. NB: my open source project (which I dream to become a GNU one) is an inference engine for expert systems. --=20 Basile STARYNKEVITCH =20 8 rue de la Fa=C3=AFencerie =20 http://starynkevitch.net/Basile/ =20 92340 Bourg-la-Reine =20 https://github.com/bstarynk France =20 https://github.com/RefPerSys/RefPerSys https://orcid.org/0000-0003-0908-5250