Hi, Revised patch for supporting DW_AT_calling_convention. This helps GDB identify the "main" program for languages that do not have a starting subroutine called "main". It adds a new API set for keeping track of the symbol associated with "main". Note that there are 3 checks for DW_AT_calling_convention. They are all necessary as they are detected at different times when processing program debug information. 2002-07-10 Petr Sorfa (petrs@caldera.com) * dwarf2read.c (read_subroutine_type): Expanded to recognize the DW_AT_calling_convention DWARF attribute and for DW_CC_program and calls set_main_name (). (read_partial_die): Now recognizes the DW_AT_calling_convention attribute and calls set_main_name(). (new_symbol): Checks whether the new symbol has a die entry for DW_AT_calling_convention and calls set_main_symbol() for DW_CC_program. * symtab.h (set_main_symbol): (get_main_symbol): (is_main_symbol): Added extern prototypes for these dealing with setting the ``main'' symbol. * symtab.c (symbol_of_main): New static variable that points to the current ``main'' symbol. (set_main_symbol): New function that assigns a value to symbol_of_main. (get_main_symbol): Returns the value of symbol_of_main. (is_main_symbol): Determines whether a given symbol is equivalent to the "main" symbol.