From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28714 invoked by alias); 27 Sep 2007 08:02:04 -0000 Received: (qmail 28704 invoked by uid 22791); 27 Sep 2007 08:02:04 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 27 Sep 2007 08:01:59 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 0274718701D; Thu, 27 Sep 2007 10:06:51 +0200 (CEST) From: "Pierre Muller" To: "'Adriaan van Os'" , Cc: References: <003901c8004b$2f9a55d0$8ecf0170$@u-strasbg.fr> <20070926175805.GA6208@adacore.com> <001501c80074$ff05ddc0$fd119940$@u-strasbg.fr> <20070926194950.GA21242@adacore.com> <000701c80089$815378f0$83fa6ad0$@u-strasbg.fr> <000801c8008e$0aa12c70$1fe38550$@u-strasbg.fr> <20070927060246.GB3787@adacore.com> <000001c800d8$21cbcf00$65636d00$@u-strasbg.fr> <46FB5E2C.6080606@microbizz.nl> In-Reply-To: <46FB5E2C.6080606@microbizz.nl> Subject: RE: [RFC-3] Handle GPC specific name for main function Date: Thu, 27 Sep 2007 08:02:00 -0000 Message-ID: <000101c800dc$ab0648a0$0112d9e0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us 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: 2007-09/txt/msg00401.txt.bz2 > -----Original Message----- > From: gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] On Behalf Of Adriaan van Os > Sent: Thursday, September 27, 2007 9:39 AM > To: gpc@gnu.de > Subject: Re: [RFC-3] Handle GPC specific name for main function > > > Pierre Muller wrote: > > Based on comments from Waldek and concerns from Joel, > > I propose that we first check for the presence of the > > '_p_initialize' minimal symbol, and only look for > > '_p_M0_main_program' and 'pascal_main_program' > > if the '_p_initialize' was found. > > The check should certainly not be for _p_M0_main_program or > pascal_main_program'. Waldek rightly > remarked that e.g. shared libraries won't have these symbols. Better is > to look for _p_initialize > and/or GPC_RTS_VERSION_YYYYMMDD. As stated in my other email, the whole purpose of this patch is not to determine if the source was compiled by GPC, but to get the command 'start' to end up at the right location. This right location is either '_p_M0_main_program' or 'pascal_main_program' (or 'program_Foo' for very old version, that my patch will not support.) > > This should reduce substantially the risks of false > > catches. > > Joel, does this seem enough for you, or should we really insist > > on checking if the program was compiled by gcc, like Waldek also > > suggested, but which would mean that only programs > > having debug information present would get a chance of being detected > > correctly, while the present patch also works for > > programs without debugging information. > > For compatibility with some bintools even FPC emits 'gcc2_compiled' (on > Linux, I believe). Meaning that this is not a good way to distinguish between GPC and Free Pascal anyhow. Pierre