2007-10-24 Wu Zhou Carlos Eduardo Seo * dwarf2read.c (read_partial_die): check the value of DW_AT_calling_convention in Fortran programs. Index: src/gdb/dwarf2read.c =================================================================== --- src.orig/gdb/dwarf2read.c +++ src/gdb/dwarf2read.c @@ -5616,6 +5616,13 @@ read_partial_die (struct partial_die_inf case DW_AT_byte_size: part_die->has_byte_size = 1; break; + case DW_AT_calling_convention: + /* DWARF standard suggests to use value DW_CC_program of attribute + DW_AT_calling_convention to indicate the Fortran main program. + The following code is to check this. */ + if (DW_UNSND (&attr) == DW_CC_program) + set_main_name (part_die->name); + break; default: break; }