Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: Andrew Burgess <aburgess@redhat.com>,
	Matthieu Longo <matthieu.longo@arm.com>,
	gdb@sourceware.org
Cc: b.starynkevitch@gmail.com
Subject: Re: Adding architecture-specific commands in GDB
Date: Mon, 07 Sep 2026 19:28:16 +0200	[thread overview]
Message-ID: <35c52ee346c8f6a2e6f6c9193725c3c022397498.camel@starynkevitch.net> (raw)
In-Reply-To: <87ldc3or1h.fsf@redhat.com>

On Wed, 2026-06-24 at 17:13 +0100, Andrew Burgess via Gdb wrote:
> Matthieu Longo via Gdb <gdb@sourceware.org> writes:
> 
> > Hi all,
> > 
> > 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.
> > 
> > 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#Extending-GDB

I (Basile S.) personally prefer GNU guile to Python and GDB can be
extended using GN§U 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.


-- 

Basile STARYNKEVITCH                           
<basile@starynkevitch.net>
8 rue de la Faïencerie                      
http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                        
https://github.com/bstarynk
France                               
https://github.com/RefPerSys/RefPerSys
                  https://orcid.org/0000-0003-0908-5250

      parent reply	other threads:[~2026-09-07 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 16:26 Matthieu Longo via Gdb
2026-06-24 16:13 ` Andrew Burgess via Gdb
2026-06-26  8:52   ` Matthieu Longo via Gdb
2026-09-04 16:04     ` Tom Tromey
2026-09-07 17:28   ` Basile STARYNKEVITCH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35c52ee346c8f6a2e6f6c9193725c3c022397498.camel@starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=aburgess@redhat.com \
    --cc=b.starynkevitch@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=matthieu.longo@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox