[RFC-3] Handle GPC specific name for main function

Joel Brobecker brobecker@adacore.com
Thu Sep 27 16:32:00 GMT 2007


> > >   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.
> > 
> > Seems reasonable to me.  Joel?
> 
> Seems reasonable to me too.

Actually, is it really reducing the potential for false positives?

Let's recap: _p_initialize is defined when the Pascal runtime is linked
in. _p_MO__main_program is sufficiently unlikely that such a symbol name
should be a Pascal procedure pretty much all the time. So I'm wondering
whether checking for _p_initialize will help reducing the number of
false positive at all (because would _p_MO__main_program => _p_initialize).
So is this patch really better than the previous one?

-- 
Joel



More information about the Gdb-patches mailing list