From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Zannoni To: Andrew Cagney Cc: GDB Patches Subject: Re: [rfa/sym*] Look at N_MAIN Date: Sun, 01 Apr 2001 17:11:00 -0000 Message-id: <15047.50070.204436.871382@kwikemart.cygnus.com> References: <3AB23416.EF23DDB2@cygnus.com> X-SW-Source: 2001-04/msg00011.html 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 > > * symtab.c (main_name): New function. > (set_main_name): New function. > * symtab.h: Declare. > > From 2000-03-05 Anthony Green : > * 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