This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New language support : Vala


>>>>> "Abderrahim" == Abderrahim KITOUNI <a.kitouni@gmail.com> writes:

Abderrahim> Here is a patch I wrote last summer that adds support for
Abderrahim> a new language to gdb.  It's called Vala [1], it's a high
Abderrahim> level programming language (like C# or Java) and compiles
Abderrahim> to GObject C.

Fun!

Abderrahim> I didn't write a parser, I just used the java one. The
Abderrahim> attached patch is made with gdb 6.8

I took a quick look through the patch and there are definitely things
in there that won't apply today.  So, I suggest updating to CVS gdb
and resubmitting.

Also, I noticed a fair amount of code not conforming to GNU standards
-- missing spaces, spaces in the wrong places, comments that are not
full sentences; IOW, the usual sorts of nits.  This will all come up
in any eventual review, so I'd recommend taking a stab at fixing these
beforehand.

Any new file needs a copyright header.

All new functions ought to have an introductory comment explaining
their purpose, arguments, and return value.

For the stack.c change, I suggest a new language function that returns
true if the symbol ought to be printed.  Other languages can always
return 1.

I'm also not so sure about the valops.c change or the gdbtypes.c
change.  In general I think explicit checks of the current language
ought to be avoided in generic code.

I wonder whether some of this is better done in Python.  For instance,
perhaps specialized value-printing stuff could be done using a Python
pretty-printer.  (This code isn't in gdb CVS yet, but is coming
soon... and you can use it today by checking out from Archer.)  My
thinking here is that this might benefit all glib users, not just
Vala.  But this is just an idea, I won't insist on it.

Alternatively, I wonder whether some of the generic changes could be
made unnecessary by having a real Vala parser.

This patch needs a ChangeLog entry.

I think the overall direction of the patch seems reasonable.

Abderrahim> P.S. I don't have a copyright assignment yet.

I'll send you email off-list to get you started.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]