This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC-3] Handle GPC specific name for main function
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Daniel Jacobowitz
> Sent: Thursday, September 27, 2007 2:11 PM
> To: Pierre Muller
> Cc: 'Adriaan van Os'; gpc@gnu.de; gdb-patches@sourceware.org
> Subject: Re: [RFC-3] Handle GPC specific name for main function
>
> On Thu, Sep 27, 2007 at 09:57:41AM +0200, Pierre Muller wrote:
> > > On second thought - are these symbols present when linking to a
> dynamic
> > > libgpc ?
> >
> > Does this matter anyhow?
> > We are just trying to get the
> > gdb command 'start' to end up at the right location,
> > i.e. for a pascal program, at the start of
> > the main procedure of the main source.
>
> Yes, it matters. libgpc will not be loaded yet, so _p_initialize
> might be missing when we try to find the main function.
Would then looking after __imp_p_initialize
find something?
You need to excuse me, but I have no
idea of the library loading works...
Anyhow, this can only lead to failures to detect
GPC properly. I think that the patch, even if it might
miss more cases, is also much more safe this way, because
we only use (_p_MO__main_program or pascal_main_program)
as start command breakpoint if '_p_initialize' was also found.
Pierre