Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Mihail Zenkov <mihail.zenkov@gmail.com>
Cc: tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: D language support
Date: Wed, 21 Apr 2010 15:57:00 -0000	[thread overview]
Message-ID: <20100421155657.GA19194@adacore.com> (raw)
In-Reply-To: <20100421025919.ad3a0830.mihai.zenkov@gmail.com>

> gdb/ChangeLog:
> 	D language support.
> 	* Makefile.in (SFILES): Add d-lang.c d-valprint.c.
> 	(COMMON_OBS): Add d-lang.o d-valprint.o.
> 	(HFILES_NO_SRCDIR): Add d-lang.h.
> 	* c-lang.c (c_emit_char, exp_descriptor_c): Make public.
> 	* c-lang.h (c_emit_char, exp_descriptor_c): Add declaration.
> 	* d-lang.c: New file.
> 	* d-lang.h: New file.
> 	* d-valprint.c: New file.
> 	* defs.h (enum language): Add language_d.
> 	* dwarf2read.c (set_cu_language): Add DW_LANG_D.
> 	* language.c (binop_result_type, integral_type, character_type) 
> 	(string_type, boolean_type, structured_type): Add language_d.
> 	* symfile.c (init_filename_language_table): Add language_d.
> 	* symtab.c: Include d-lang.h.
> 	(symbol_init_language_specific, symbol_find_demangled_name)
> 	(symbol_natural_name, lookup_symbol_in_language)
> 	(symbol_demangled_name, symbol_matches_domain): Add language_d.
> gdb/doc/ChangeLog:
> 	* gdb.texinfo: Add mention about D language support.
> gdb/testsuite/ChangeLog:
> 	* gdb.base/default.exp: Fix "set language" test.

Overall, looks good to me, but I have a question on a couple of globals
and a few last formatting nits.  We will also need to add an entry in
the NEWS file, but that can be done separately.

> +extern void c_emit_char (int c, struct type *type, struct ui_file *stream, int quoter);

This line exceeds the 78 characters limit - can you split it in two?

> +static const char *mangled_str;

I think this part needs to be rethinked, or at least I don't understand
why this needs to be a global. Can you elaborate?

Similarly, I do not understand why ...
> +/* Temporary obstack used for holding strings.  */
> +static struct obstack tempbuf;
... needs to be a global?

I will not necessarily object to the code being checked in as is;
this is, after all, an implementation detail local to this language,
but if we can look at this, and fix it if applicable, let's do it now.

> +  if (gsymbol->language == language_d
> +      || gsymbol->language == language_auto)
> +    {
> +      demangled =
> +	d_demangle(mangled, 0);

Can you join the last two lines?

-- 
Joel


  reply	other threads:[~2010-04-21 15:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-23 23:57 Mihail Zenkov
2009-12-30 12:56 ` Joel Brobecker
2010-01-09  6:25   ` Mihail Zenkov
2010-01-09  6:29     ` Mihail Zenkov
2010-01-09 14:23       ` Joel Brobecker
2010-01-13  4:42         ` Mihail Zenkov
2010-01-15  5:10           ` Joel Brobecker
2010-01-15 21:02             ` Tom Tromey
2010-01-15 21:05           ` Tom Tromey
2010-04-14 22:22             ` Mihail Zenkov
2010-04-20 21:39               ` Tom Tromey
2010-04-21  0:01                 ` Mihail Zenkov
2010-04-21 15:57                   ` Joel Brobecker [this message]
2010-04-22  0:11                     ` Mihail Zenkov
2010-04-22  0:44                       ` Joel Brobecker
2010-04-22  1:53                         ` Mihail Zenkov
2010-04-23 18:11                           ` Tom Tromey
2010-04-24  0:06                             ` Mihail Zenkov
2010-04-27 16:05                               ` Joel Brobecker
2010-04-27 23:55                                 ` Mihail Zenkov
2010-04-28 15:17                                   ` Joel Brobecker
2010-04-28 17:11                                     ` Eli Zaretskii
2010-04-29  2:16                                     ` Mihail Zenkov
2010-04-28 17:10                                   ` Eli Zaretskii
2010-04-29  1:59                                     ` Mihail Zenkov
2010-04-29  3:10                                       ` Eli Zaretskii
2010-04-29 14:47                                       ` Joel Brobecker
2010-04-23 18:09                         ` Tom Tromey
2010-04-23 20:15                           ` Leandro Lucarella
2010-04-23 20:37                             ` Tom Tromey
2010-04-26 23:51                               ` Stan Shebs
2010-04-27  0:29                                 ` Joel Brobecker
2010-04-23 21:35               ` Robert Clipsham
2010-04-24  0:26                 ` Mihail Zenkov
2010-04-27 20:27                   ` Robert Clipsham
  -- strict thread matches above, loose matches on Subject: below --
2009-08-17 23:02 Mihail Zenkov
2009-08-18  4:18 ` Eli Zaretskii
2009-08-18 16:39 ` Tom Tromey
     [not found]   ` <20090818225844.GA9879@homero.springfield.home>
2009-08-19 18:36     ` Tom Tromey

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=20100421155657.GA19194@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mihail.zenkov@gmail.com \
    --cc=tromey@redhat.com \
    /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