This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: prototyping linux kernel-side gdbstub for userspace
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: archer at sourceware dot org, utrace-devel at redhat dot com, systemtap at sourceware dot org
- Date: Mon, 22 Jun 2009 09:49:53 -0400
- Subject: Re: prototyping linux kernel-side gdbstub for userspace
- References: <20090620023204.GK19576@redhat.com><20090621151606.GA10157__45629.7419652857$1245597392$gmane$org@caradoc.them.org>
drow wrote:
>> I'm slowly assembling a prototype gdb stub for debugging user-space
>> programs, based on utrace, for possible eventual inclusion in the
>> linux kernel. [...] But before too long though it should be able
>> to use uprobes (q.v.) as a kernel-side breakpointing facility using
>> the Z packets, and maybe even support agent expressions,
>> multithreaded processes, and multiprocess debugging.
> For those of us with less context, why do it this way instead of
> exposing those features for a userspace gdbserver?
One reason is that these would require extending the kernel ABI,
whether ptrace(2) or something new, and as well extending the
userspace clients. Doing it across the plain remote protocol means
basically no changes on either end. This is not to say that the above
can't happen at some point.
> I can't say I'm thrilled to have this in kernel space.
(Of course there is no reason you have to build / run it.)
- FChE