From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14612 invoked by alias); 25 Oct 2007 20:57:56 -0000 Received: (qmail 14600 invoked by uid 22791); 25 Oct 2007 20:57:55 -0000 X-Spam-Check-By: sourceware.org Received: from igw2.br.ibm.com (HELO igw2.br.ibm.com) (32.104.18.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 25 Oct 2007 20:57:52 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw2.br.ibm.com (Postfix) with ESMTP id 648E517F6F3 for ; Thu, 25 Oct 2007 18:55:11 -0200 (BRDT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9PKvnAS2961478 for ; Thu, 25 Oct 2007 18:57:49 -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 l9PKvmdi021932 for ; Thu, 25 Oct 2007 17:57:49 -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 l9PKvmhm021923; Thu, 25 Oct 2007 17:57:48 -0300 Message-ID: <4721034D.2060502@linux.vnet.ibm.com> Date: Thu, 25 Oct 2007 21:47: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 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> <4720FE48.8020200@linux.vnet.ibm.com> <20071025204134.GC4157@adacore.com> In-Reply-To: <20071025204134.GC4157@adacore.com> OpenPGP: id=8BFFA900 Content-Type: multipart/mixed; boundary="------------060603080305000602080902" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00679.txt.bz2 This is a multi-part message in MIME format. --------------060603080305000602080902 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 856 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joel Brobecker wrote: > > Just one minor comment: > >> + if ((DW_UNSND (&attr) == DW_CC_program) && (cu->language == language_fortran)) > > Could you remove the unnecessary extra parens and split this line > into two (it's too long): > > if (DW_UNSND (&attr) == DW_CC_program > && cu->language == language_fortran) > > Your patch is approved with that adjustment. > > Thanks, Ok, here's the version I commited, with Joel's suggestion and approval. 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 iD8DBQFHIQNMqvq7Aov/qQARAlRVAJsEheBLCyh8VdDHPy4Cyg5avI55hACeJxaz +Y3B2mdbNkmBF9G/gthtq/c= =xOwT -----END PGP SIGNATURE----- --------------060603080305000602080902 Content-Type: text/x-patch; name="fortran-main.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fortran-main.diff" Content-length: 1472 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,25 @@ 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; } --------------060603080305000602080902 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 iD8DBQBHIQNMqvq7Aov/qQARAke9AJwKmsar5mngY276bXvXvxgMaOt1IgCe O4aixlwM57d8GarBD8umQ4KfJsk= --------------060603080305000602080902--