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-2] Handle GPC specific name for main function


Pierre,

> 2007-09-26  Pierre Muller  <muller@ics.u-strasbg.fr>
> 
>         * p-lang.h (pascal_main_name): New function.
>         p-lang.c (GPC_MAIN_PROGRAM_NAME_1),
>         (GPC_MAIN_PROGRAM_NAME_2): New char array constants
>         corresponding to the two minimal symbols used
>         by GPC compiler.
>         (pascal_main_name): Try to find minimal symbol
>         corresponding to the entry of GPC compiled programs.
>         symtab.c: New include p-lang.h.
>         (find_main_name): Try to find pascal specific main name
>         by calling pascal_main_name.
>         * Makefile.in (symtab.o): Add dependency on p-lang header.

Based on the new information that we received, and if I understood
it correctly, it looks like we were operating on the wrong assumption,
which makes this patch actually wrong. I should say "less correct".

This will work fine for programs written exclusively in Pascal,
and multi-language programs where the main in Pascal. However,
there is a chance that this patch makes GDB incorrectly determine
the main to be a Pascal procedure when in fact it is not. I'm not sure
about the ratio of the better behavior vs the incorrect one.

Maybe it is one of these patches that may improve the situation 75%
of the time, while introducing a bug the rest of the time.  So maybe
the GDB maintainers as a group will find that it is still fine to still
include your patch as a pragmatic compromise. But I can no longer give
it the OK on my own. I personally don't have a strong opinion, but I'm
slightly leaning against it. I would prefer us to start designing a
better way now.

-- 
Joel


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