From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1729 invoked by alias); 25 Oct 2007 20:36:30 -0000 Received: (qmail 1709 invoked by uid 22791); 25 Oct 2007 20:36:29 -0000 X-Spam-Check-By: sourceware.org Received: from igw3.br.ibm.com (HELO igw3.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 25 Oct 2007 20:36:27 +0000 Received: from mailhub1.br.ibm.com (unknown [9.18.232.109]) by igw3.br.ibm.com (Postfix) with ESMTP id B9212390161; Thu, 25 Oct 2007 18:29:57 -0200 (BRDT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9PKaOfN2932744; Thu, 25 Oct 2007 18:36:24 -0200 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l9PKaNTm015905; Thu, 25 Oct 2007 17:36:23 -0300 Received: from [9.18.238.59] ([9.18.238.59]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l9PKaMH8015894; Thu, 25 Oct 2007 17:36:23 -0300 Message-ID: <4720FE48.8020200@linux.vnet.ibm.com> Date: Thu, 25 Oct 2007 20:36:00 -0000 From: Carlos Eduardo Seo User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: Joel Brobecker CC: Jim Blandy , gdb@sourceware.org, GDB Patches Mailing List , drow@false.org Subject: Re: Problems while debugging fortran References: <19c433eb0710250906k392cecf8t1f99595d5c5a8107@mail.gmail.com> <20071025170621.GA27275@caradoc.them.org> <20071025190150.GA1560@caradoc.them.org> <20071025202406.GC4063@adacore.com> In-Reply-To: <20071025202406.GC4063@adacore.com> OpenPGP: id=8BFFA900 Content-Type: multipart/mixed; boundary="------------050707010000060401060504" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00243.txt.bz2 This is a multi-part message in MIME format. --------------050707010000060401060504 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 526 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joel Brobecker wrote: > I think that's a great comment. Let's use that one. > All right. Here's the updated patch with Jim's comments. Ok now? Regards, - -- Carlos Eduardo Seo Software Engineer IBM Linux Technology Center -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHIP5Hqvq7Aov/qQARAg1wAKCKTPmOboGpEXy+4JOYI/t6ky5haQCfTSE4 K7lNORxqXOlJqRSJKSR/ZQk= =aeaW -----END PGP SIGNATURE----- --------------050707010000060401060504 Content-Type: text/x-patch; name="fortran-main.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fortran-main.diff" Content-length: 1468 2007-10-25 Wu Zhou Carlos Eduardo Seo Jim Blandy * 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,24 @@ 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 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; } --------------050707010000060401060504 Content-Type: application/octet-stream; name="fortran-main.diff.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="fortran-main.diff.sig" Content-length: 90 iD8DBQBHIP5Iqvq7Aov/qQARAqoOAJ9gv1p4OG/5mSrYZiy6ktnveqNViwCe NVrBQkoC9RYjQM9YdwM6dj8x6m4= --------------050707010000060401060504--