Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb ml <gdb@sourceware.org>
Subject: Re: plugin interface for GDB
Date: Fri, 20 Apr 2007 21:55:00 -0000	[thread overview]
Message-ID: <20070420215513.GA1434@caradoc.them.org> (raw)
In-Reply-To: <1177104071.17757.58.camel@localhost.localdomain>

On Fri, Apr 20, 2007 at 06:21:11PM -0300, Thiago Jung Bauermann wrote:
> I agree that a plugin interface and a scripting language overlap a lot
> in terms of functionality. I'm not sure it would cut it in my specific
> case... I'm looking at something which will potentially need to examine
> 10's of GB of inferior memory in some cases and I'm a bit worried about
> the performance. If there was already scripting language support in GDB,
> I could do some benchmarks. It's quite possible that the overhead of the
> scripting language would be low or acceptable. But right now I don't
> want to work (probably a lot) on developing such support only to find
> out it won't meet my performance needs... :-)

Well, it's going to get developed eventually in either case.  If you
can't write things fast enough in Python, Python itself lets you load
C modules to do the real work; the question is how fast GDB can
provide memory access to the Python layer.  And I think the answer is
roughly as fast as GDB could get at it directly.

> We want to add support in GDB to debug both IBM's JVM and programs
> running on top of it at the same time. It could go into GDB proper,
> except that we need to keep our modifications internal and I want to
> minimize the burden of porting the code to new GDB releases, so I don't
> want to mess too much with the guts of GDB. (objectionable motivation, I
> know. But these are the constraints I need to work with).

Not surprising constraints.  The trick, for you and for us, is to
minimize the amount of it is local to IBM and specific to the JVM.

> As I said, a plugin interface is a good answer to that need, and I'll
> probably do such interface even if only to keep it internal.
> 
> I believe there are other people in the same situation as mine. I've
> seen messages here stating something like "I'm using an old version of
> GDB because I customized it and still didn't port the code to a newer
> version". A plugin interface would help those people.

This, you see, is the part I don't believe.  I think that a _perfect_
plugin interface would help.  You get to draw your own conclusions on
how likely that is :-)

> > I do not believe that you can come up with an abstraction layer big
> > enough to be useful that is not a significant maintenance burden for
> > the GDB developers.  I've been surprised before, though!
> 
> I think you'd be surprised. :-)
> 
> I was. In a very short time we were able to come up with a working
> prototype which provides very little functionality (basically, just
> interaction with the user and peek inferior memory) but at the same time
> is enough to meet some of our needs.
> 
> Of course there's a long way to go from there, and code will start
> getting more complex. But if it's useful enough, the maintenance burden
> is bearable.

The question is what you need, and how easy it is to expose in another
way.  I did a prototype of Guile integration in just a couple of days
that did basically the same amount you've got here; and if I'd done it
in Python (being a language I can actually write things in, unlike the
staggering around I do in Guile), it could even have been useful.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-04-20 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 19:44 Thiago Jung Bauermann
2007-04-20 19:57 ` Brian Dessent
2007-04-20 21:39   ` Thiago Jung Bauermann
2007-04-20 20:00 ` Daniel Jacobowitz
2007-04-20 21:21   ` Thiago Jung Bauermann
2007-04-20 21:55     ` Daniel Jacobowitz [this message]
2007-04-20 22:01       ` Paul Koning
2007-04-20 23:00         ` Robert Dewar

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=20070420215513.GA1434@caradoc.them.org \
    --to=drow@false.org \
    --cc=bauerman@br.ibm.com \
    --cc=gdb@sourceware.org \
    /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