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: [RFC-3] Handle GPC specific name for main function



> -----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



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