From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27987 invoked by alias); 10 Jan 2014 17:26:58 -0000 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 Received: (qmail 27966 invoked by uid 89); 10 Jan 2014 17:26:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qe0-f49.google.com Received: from mail-qe0-f49.google.com (HELO mail-qe0-f49.google.com) (209.85.128.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 10 Jan 2014 17:26:55 +0000 Received: by mail-qe0-f49.google.com with SMTP id w4so1932550qeb.8 for ; Fri, 10 Jan 2014 09:26:53 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.229.122.195 with SMTP id m3mr9574320qcr.7.1389374813458; Fri, 10 Jan 2014 09:26:53 -0800 (PST) Received: by 10.229.195.196 with HTTP; Fri, 10 Jan 2014 09:26:53 -0800 (PST) In-Reply-To: References: <87wqi981ef.fsf@fleche.redhat.com> Date: Fri, 10 Jan 2014 17:26:00 -0000 Message-ID: Subject: Re: [PATCH 3/5] Add d_main_name to dlang.c From: Iain Buclaw To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00290.txt.bz2 On 9 January 2014 18:29, Iain Buclaw wrote: > On 9 January 2014 18:18, Tom Tromey wrote: >>>>>>> "Iain" == Iain Buclaw writes: >> >> Iain> The main program in D is _Dmain (demangled as 'D main') not C 'main'. >> Iain> So the logical entry point of the program should be set accordingly. >> >> Iain> 2014-01-09 Iain Buclaw >> >> Iain> * d-lang.h (d_main_name): Add declaration. >> Iain> * d-lang.c (d_main_name): New function. >> Iain> * symtab.c (find_main_name): Add call to d_main_name. >> >> This is ok. >> >> Iain> +static const char D_MAIN[] = "D main"; >> >> If D symbols routinely demangle to have spaces in them, then I think >> your users may be in for some difficulties using gdb. Right now I think >> linespecs have some hacks to let this work for C++, but I'm not sure how >> readily they could be extended to the above. >> >> If it is just the one symbol, then no big deal, there is quoting. >> > > It's just the one symbol. 'D main' is the demangled name, _Dmain is > the mangled. Either one works perfectly well with `start`, and when > using cgdb, it sets the start line in the correct place. So would you prefer that _Dmain were used here?