diff options
author | Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> | 2007-10-25 20:54:27 +0000 |
---|---|---|
committer | Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> | 2007-10-25 20:54:27 +0000 |
commit | 68511cecac53d805c72e65d0f31abeca17098f0e (patch) | |
tree | 4169fee7508d726b87627b533db8c7ce130e121a /gdb | |
parent | 5876dc880e830e7ef132e4a7cf2f28345c583281 (diff) | |
download | gdb-68511cecac53d805c72e65d0f31abeca17098f0e.zip gdb-68511cecac53d805c72e65d0f31abeca17098f0e.tar.gz gdb-68511cecac53d805c72e65d0f31abeca17098f0e.tar.bz2 |
* dwarf2read.c (read_partial_die): check the value
of DW_AT_calling_convention in Fortran programs.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 19 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f86576c..4995dc2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2007-10-25 Wu Zhou <woodzltc@cn.ibm.com> + Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> + Jim Blandy <jimb@codesourcery.com> + + * dwarf2read.c (read_partial_die): check the value + of DW_AT_calling_convention in Fortran programs. + 2007-10-25 Wu Zhou <woodzltc@cn.ibm.com> Thiago Jung Bauermann <bauerman@br.ibm.com> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5d85519..1498d1f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -5619,6 +5619,25 @@ read_partial_die (struct partial_die_info *part_die, case DW_AT_byte_size: part_die->has_byte_size = 1; break; + case DW_AT_calling_convention: + /* DWARF doesn't provide a way to identify a program's source-level + entry point. DW_AT_calling_convention attributes are only meant + to describe functions' calling conventions. + + However, because it's a necessary piece of information in + Fortran, and because DW_CC_program is the only piece of debugging + information whose definition refers to a 'main program' at all, + several compilers have begun marking Fortran main programs with + DW_CC_program --- even when those functions use the standard + calling conventions. + + So until DWARF specifies a way to provide this information and + compilers pick up the new representation, we'll support this + practice. */ + if (DW_UNSND (&attr) == DW_CC_program + && cu->language == language_fortran) + set_main_name (part_die->name); + break; default: break; } |