From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17009 invoked by alias); 24 Oct 2007 21:56:56 -0000 Received: (qmail 16991 invoked by uid 22791); 24 Oct 2007 21:56:55 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 24 Oct 2007 21:56:48 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw1.br.ibm.com (Postfix) with ESMTP id 5D1A632C11D; Wed, 24 Oct 2007 19:54:19 -0200 (BRDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9OLujGA2928804; Wed, 24 Oct 2007 19:56:45 -0200 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l9OLuj9w000480; Wed, 24 Oct 2007 18:56:45 -0300 Received: from [9.18.238.59] (dyn531792.br.ibm.com [9.18.238.59]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l9OLujYj000475; Wed, 24 Oct 2007 18:56:45 -0300 Message-ID: <471FBF9E.5000607@linux.vnet.ibm.com> Date: Wed, 24 Oct 2007 21:56:00 -0000 From: Carlos Eduardo Seo User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: Joel Brobecker , drow@sourceware.org, gdb@sourceware.org Subject: Re: Problems while debugging fortran References: <46EB035B.4090802@linux.vnet.ibm.com> <20070920173246.GJ16400@adacore.com> <46F2CE45.5020308@linux.vnet.ibm.com> <20070920204622.GB4368@adacore.com> <20070920205629.GA17779@caradoc.them.org> <46FAD136.5030406@linux.vnet.ibm.com> <20070926214619.GC9403@adacore.com> <471F70C0.3000206@linux.vnet.ibm.com> <20071024193336.GI11797@adacore.com> <20071024195719.GA16009@caradoc.them.org> <471FA810.6080506@linux.vnet.ibm.com> In-Reply-To: <471FA810.6080506@linux.vnet.ibm.com> OpenPGP: id=8BFFA900 Content-Type: multipart/mixed; boundary="------------040809090502080308060808" 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/msg00213.txt.bz2 This is a multi-part message in MIME format. --------------040809090502080308060808 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 785 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Carlos Eduardo Seo wrote: > > > Daniel Jacobowitz wrote: >> Yes, this does seem sensible. > > Great, I can come up with a patch shortly. > > Regards, > Actually, I was re-reading this thread and I think we can use Wu Zhou's patch mentioned before. I've just refreshed it so it applies cleanly on CVS head and it's working fine with my Fortran binaries. What do you think? Any modifications suggested? 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 iD8DBQFHH7+eqvq7Aov/qQARAjNoAJ4hHCpEk9u1+gW/B5uVen+Rq0XWLwCeJ+9z KjKTK0t2acXQaM+HbLkT6/Y= =UjNN -----END PGP SIGNATURE----- --------------040809090502080308060808 Content-Type: text/x-patch; name="fortran-main.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fortran-main.diff" Content-length: 838 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; } --------------040809090502080308060808 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 iD8DBQBHH7+eqvq7Aov/qQARAkikAJ9BCmHcKhIZ6/jI359mXBANhKPLBQCg iTD5fDF2E5jic9BXwcvA7PLEzK0= --------------040809090502080308060808--