public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Andrew Burgess <aburgess@redhat.com>,
	gdb-patches@sourceware.org, gdb@sourceware.org
Cc: Pedro Alves <pedro@palves.net>
Subject: Re: [RFC] Removing in process agent (IPA)
Date: Thu, 13 Jun 2024 16:08:00 +0100	[thread overview]
Message-ID: <c9cfdbe4-c224-458d-b2fd-e84d7f109f96@arm.com> (raw)
In-Reply-To: <87y1797wqf.fsf@redhat.com>

On 6/13/24 15:17, Andrew Burgess via Gdb wrote:
> 
> Hi,
> 
> I'd like to have a conversation about whether or not we want to keep the
> in-process-agent (IPA or libinproctrace.so).
> 
> A couple of recent patches[1][2] have triggered the question of whether
> it would be better if we just dropped IPA from GDB.
> 
> We do have some tests that make use of IPA in gdb.trace/, so its no
> untested code.
> 
> I'd describe myself as neutral on this topic.  I've never used the IPA
> myself, but I have no real objections to it continuing to live on.
> However, if nobody wants to keep it I'm happy to do to the work to
> remove it from GDB.
> 
> So my question to the group: would anyone like to speak in favour of
> keeping the IPA around?
> 
> Thanks,
> Andrew
> 
> [1] https://inbox.sourceware.org/gdb-patches/cover.1706801009.git.aburgess@redhat.com
> [2] https://inbox.sourceware.org/gdb-patches/f18d8f32e1e8af423e38efd0cb58ced1a98b5efb.1718271737.git.aburgess@redhat.com
> 

Thanks for starting this Andrew.

For context into this rather obscure (nowadays) library, [1] shows the
original intended design and commit fa593d66d5696018bc8fb166f9e2a960d484ccd0
is the first pushed change to add the IPA, from what I could track down.

[1] https://sourceware.org/legacy-ml/gdb/2011-12/msg00004.html
[2] fa593d66d5696018bc8fb166f9e2a960d484ccd0

I think some of the design bits never made it into upstream gdb (itsets?), and
the tracepoints mechanism was mostly used by non-gdbserver debugging servers,
with gdbserver seemingly being more of a reference implementation.

Fast-forward to today, we have a lot of multi-core/multi-threaded systems
(even heterogeneous), but I can't really say the IPA library is being used
more (or at all), or the way it was intended back in the day. We do use little
bits (agent expressions), but not a lot.

Nowadays we also have better debugging tools to do the job, not necessarily in
gdb (RR, various tracing mechanisms).

I think it is important to remove maintenance burden if possible, and with
this perspective, I consider it is time for the IPA to go.

Similarly, I also think it might be time to consider dropping the tracepoints
(mainly static and fast) machinery from gdbserver, as I suspect that is another
mechanism that is not being used very often.

I recall trying to use tracepoints for practical purposes (back in the day), and
it wasn't up to the task, being too cumbersome to use, having bad failure modes
and having other security implications when trying to debug stuff in production
platforms. The remote protocol side of it is OK, but again, I bet no debugging
stubs are using that anymore.

  reply	other threads:[~2024-06-13 15:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 14:17 Andrew Burgess
2024-06-13 15:08 ` Luis Machado [this message]
2024-06-13 16:38   ` Tom Tromey
2024-06-13 18:11   ` Terekhov, Mikhail
2024-06-14  7:54     ` Luis Machado
2024-06-14 13:47       ` Terekhov, Mikhail
2024-06-14  8:08     ` Andrew Burgess
2024-06-14 13:42       ` Terekhov, Mikhail
2024-06-14 13:48       ` Simon Marchi
2024-06-14 13:59         ` Luis Machado
2024-06-15 10:28           ` Andrew Burgess

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=c9cfdbe4-c224-458d-b2fd-e84d7f109f96@arm.com \
    --to=luis.machado@arm.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gdb@sourceware.org \
    --cc=pedro@palves.net \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).