From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21371 invoked by alias); 21 Apr 2010 15:57:07 -0000 Received: (qmail 21348 invoked by uid 22791); 21 Apr 2010 15:57:04 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Apr 2010 15:56:59 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 47DEF2BAB6A; Wed, 21 Apr 2010 11:56:58 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4SY5LUcH5fJq; Wed, 21 Apr 2010 11:56:58 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 26D1C2BAB4B; Wed, 21 Apr 2010 11:56:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B7773F5895; Wed, 21 Apr 2010 08:56:57 -0700 (PDT) Date: Wed, 21 Apr 2010 15:57:00 -0000 From: Joel Brobecker To: Mihail Zenkov Cc: tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: D language support Message-ID: <20100421155657.GA19194@adacore.com> References: <20091224015617.7092112b.mihai.zenkov@gmail.com> <20091230125539.GF2788@adacore.com> <20100109082524.263bcb17.mihai.zenkov@gmail.com> <20100109082830.dd984de8.mihai.zenkov@gmail.com> <20100109142327.GC2007@adacore.com> <20100113064026.14f75ff2.mihai.zenkov@gmail.com> <20100415012124.91ce1769.mihai.zenkov@gmail.com> <20100421025919.ad3a0830.mihai.zenkov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100421025919.ad3a0830.mihai.zenkov@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00687.txt.bz2 > 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