Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RE: GDB and scripting languages - which
@ 2007-01-15 18:29 Kaz Kylheku
  2007-01-15 21:20 ` Eli Zaretskii
  2007-01-17 19:09 ` Jim Blandy
  0 siblings, 2 replies; 56+ messages in thread
From: Kaz Kylheku @ 2007-01-15 18:29 UTC (permalink / raw)
  To: Jim Blandy, gdb

Jim Blandy wrote:
> I would prefer that GDB use a single extension language, and that that
> language be Python. 

I think it would be best to have a libgdb.so shared library with a
well-defined API. Then people can write their own bindings to call it
from whatever programming environment suits them.

I think Python is a retarded pile of crap and won't use it; moreover, I
don't care to discuss the reasons why.

But I don't want to get in your way of using it if you want, because
that would be bad engineering.

> talents in Guile.  But Guile has had more than enough time to attract
> uses and users on its own merits, and compared to Python, it hasn't
> worked out.  It's time to cut our losses.)

Guile is not even particularly attractive people who are already Scheme
programmers. For serious Scheme work, there are better implementations
out there. 

> Maintaining such libraries for multiple extension languages would be
> wasted work, and python is good enough.

It would be fine if a binding library for a just a single language were
maintained, but if there was a separation between that and a clean API,
rather than too much reliance on the internals. For instance, it would
not be very nice if the API relied some internal data structures of a
particular interpreter, and used that representation for passing values
back and forth.


^ permalink raw reply	[flat|nested] 56+ messages in thread
* RE: GDB and scripting languages - which
@ 2007-01-16  0:38 Kaz Kylheku
  2007-01-17 19:24 ` Jim Blandy
  0 siblings, 1 reply; 56+ messages in thread
From: Kaz Kylheku @ 2007-01-16  0:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jimb, gdb

Eli Zaretskii:
> Aren't we talking about a scripting language to allow decent scripting
> _inside_ GDB, i.e. about extension _to_ GDB, as opposed to making GDB
> an extension of other programs?

I don't see a significant difference between these situations. I'm only
thinking about a process image, in which I simultaneously have GDB and
the run-time of some programming language. Who gets the main entry point
when that image is started is largely irrelevant.

If GDB is packaged in such a way that it can be used as a component in
other programs, the behavior of an extended GDB can be easily achieved.
Simply link GDB to a small driver program which passes control back to
GDB. that small driver program also attaches to the programming language
run-time of choice, initializes it, and registers some hooks in GDB to
be able to use it.

> > Guile is not even particularly attractive people who are 
> already Scheme
> > programmers. For serious Scheme work, there are better 
> implementations
> > out there. 
> 
> Aren't we talking about a language for extending GDB, as opposed to a
> language ``for serious Scheme work''?

Extending GDB could be serious work, and if that work is done in Scheme,
then it is serious Scheme work.


^ permalink raw reply	[flat|nested] 56+ messages in thread
* GDB and scripting languages - which
@ 2007-01-08 22:20 Daniel Jacobowitz
  2007-01-08 22:39 ` Kip Macy
                   ` (3 more replies)
  0 siblings, 4 replies; 56+ messages in thread
From: Daniel Jacobowitz @ 2007-01-08 22:20 UTC (permalink / raw)
  To: gdb

First, disclaimer: this particular topic is a classic source of
bikeshedding.  I'd like to avoid a prolonged discussion of scripting
language pros and cons on this list.  So, please, limit on-list
followups to the question of single versus multiple bindings and the
use of guile, OK?  If you want to rant at me about my heretic selection
of languages, feel free, but please don't reply to the list in that
case.

Basically, my question is whether we should support one language or
many, and if only one, which.  The GNU coding standards have this
to say:

  The standard extensibility interpreter for GNU software is GUILE
  (http://www.gnu.org/software/guile/), which implements the language
  Scheme (an especially clean and simple dialect of Lisp). We don't
  reject programs written in other scripting languages such as Perl and
  Python, but using GUILE is very important for the overall consistency
  of the GNU system.

So the obvious thing to do would be to have just one and have it be
guile.  I'm not sure how much consistency that really adds - I could
only find a handful of GNU programs embedding guile.  And it presents
another problem for me: I'm a pretty much incompetent Scheme
programmer.  I'm a lot more inspired to add a scripting language
that I can really use.

Python would be my first choice, today.  Mostly this is because I know
it.  However (comparing to guile only here), my impression is that the
user community and library of supporting modules is much stronger than
guile's.  For instance, while this isn't the most meaningful statistic,
there are eighteen times as many python-related packages in Debian as
guile-related.  A whole lot of those are reusable modules.

The advantage of adding multiple language bindings is that users will
have the choice of whichever is more familiar for them; I know that
various people have locally added guile, python, and perl in the past.
The disadvantage, of course, is the required amount of code
(maintenance, testing).  And if GDB comes with a library of useful
routines to load from user scripts, they'll be different for each
language.  And if programs ship their own handy scripts for developers
of those programs to use, they'll be in an assortment of different
languages.

So the short version is that if I were making the decision, for my own
benefit and independent of the GNU project and GDB's users, I'd add
only Python support.  For GDB's place in the GNU project, we should
probably have guile.  And I feel like the user convenience of a
selection of languages will outweigh the extra work of multiple
language bindings.

Accordingly, I am inclined to use multiple bindings, to include at
least Python and GUILE.  My current design relies on GDB/MI for most
control of GDB; I might put the MI parser on the C side of the
interface to allow MI results to be easily converted to lists / tuples
/ et cetera in each supported language, but other than that it
would be a fairly thin interface on top of MI.

(MI isn't the most convenient interface for scripting - I'm still
trying to figure out how it will interact with GDB's value objects, but
it will probably build on top of varobj to do so.  The symmetry is
nice; what you can do in scripts you ought to be able to do in a
GUI front end to GDB too so any MI extensions useful for one
are likely useful to the other.  However, this is the subject of
a later discussion, not this one.)

I'd really appreciate hearing what others think.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2007-02-19 21:24 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-15 18:29 GDB and scripting languages - which Kaz Kylheku
2007-01-15 21:20 ` Eli Zaretskii
2007-01-16  0:17   ` Kip Macy
2007-01-17 19:09 ` Jim Blandy
  -- strict thread matches above, loose matches on Subject: below --
2007-01-16  0:38 Kaz Kylheku
2007-01-17 19:24 ` Jim Blandy
2007-01-08 22:20 Daniel Jacobowitz
2007-01-08 22:39 ` Kip Macy
2007-01-08 22:42   ` Daniel Jacobowitz
2007-01-08 23:03     ` Kip Macy
2007-01-08 22:40 ` Bob Rossi
2007-01-09 20:11 ` Jim Blandy
2007-01-09 20:23   ` Bob Rossi
2007-01-09 21:37     ` Paul Koning
2007-01-09 21:42       ` Daniel Jacobowitz
2007-01-09 21:48       ` Nick Roberts
2007-01-09 21:53         ` Daniel Jacobowitz
2007-01-11  4:31           ` Nick Roberts
2007-01-11  5:06             ` Daniel Jacobowitz
2007-01-13  8:30           ` Eli Zaretskii
2007-01-09 21:55         ` Kip Macy
2007-01-11 14:56       ` Robert Dewar
2007-01-11 15:07         ` Robert Dewar
2007-01-09 20:30   ` Mark Kettenis
2007-01-13  8:32 ` Eli Zaretskii
2007-02-10 12:28   ` Eli Zaretskii
2007-02-10 18:10     ` Pedro Alves
2007-02-10 20:33     ` Daniel Jacobowitz
2007-02-12 17:47       ` Jim Blandy
2007-02-12 21:36         ` Eli Zaretskii
2007-02-12 21:59           ` Robert Dewar
2007-02-12 22:07             ` Daniel Jacobowitz
2007-02-12 22:07               ` Robert Dewar
2007-02-14  5:57           ` Jim Blandy
2007-02-14 15:42             ` Eli Zaretskii
2007-02-14 16:01               ` Paul Koning
2007-02-14 17:50                 ` Eli Zaretskii
2007-02-14 16:06               ` Daniel Jacobowitz
2007-02-14 18:01                 ` Eli Zaretskii
2007-02-14 18:45                   ` Daniel Jacobowitz
2007-02-14 17:37               ` Robert Dewar
2007-02-14 18:24                 ` Eli Zaretskii
2007-02-14 18:29                   ` Robert Dewar
2007-02-14 18:33                     ` Eli Zaretskii
2007-02-14 18:34                       ` Robert Dewar
2007-02-14 20:14                     ` Jim Blandy
2007-02-14 20:56                       ` Robert Dewar
2007-02-14 21:47                         ` Jim Blandy
2007-02-14 21:23                       ` Jim Blandy
2007-02-14 21:46                         ` Robert Dewar
2007-02-14 20:10               ` Jim Blandy
2007-02-15  1:03                 ` Gaius Mulley
2007-02-17 13:53                 ` Eli Zaretskii
2007-02-17 14:07                   ` Daniel Jacobowitz
2007-02-18  4:11                     ` Robert Dewar
2007-02-19 22:17                       ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox