[rfa/sym*] Look at N_MAIN
Elena Zannoni
ezannoni@cygnus.com
Sun Apr 1 17:11:00 GMT 2001
Andrew Cagney writes:
> (resolving this is part of the 5.1 release criteria)
>
> The attatched patch gets GDB to make use of N_MAIN when available. The
> original, submitted by Anthony Green, needed some improvements (see
> attatched e-mails).
>
> I've addressed just the memory leak problem.
>
> Andrew2001-03-16 Andrew Cagney <ac131313@redhat.com>
>
> * symtab.c (main_name): New function.
> (set_main_name): New function.
> * symtab.h: Declare.
>
> From 2000-03-05 Anthony Green <green@redhat.com>:
> * dbxread.c (process_one_symbol): Handle the N_MAIN stab by
> setting main_name.
> * blockframe.c (inside_main_func): Use main_name instead of
> "main".
> * symtab.c (find_main_psymtab): Ditto.
> * source.c (select_source_symtab): Ditto.
> * nlmread.c (nlm_symfile_read): Ditto.
> * rs6000-tdep.c (skip_prologue): Ditto.
BTW, while grepping for 'main', 'MAIN', etc. I found some interesting
things in f-lang.h. Does anybody know what's up with these?
I coundn't see any uses or ChangeLog entries related to them.
extern char *real_main_name; /* Name of main function */
extern int real_main_c_value; /* C_value field of main function */
#define DEFAULT_DOTMAIN_NAME_IN_MF77 ".MAIN_"
#define DEFAULT_MAIN_NAME_IN_MF77 "MAIN_"
#define DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY ".main "
#define DEFAULT_DOTMAIN_NAME_IN_XLF ".main"
Also there is a "main" hack in hp-psymtab-read.c and hp-symtab-read.c
But that's local.
Elena
More information about the Gdb-patches
mailing list