From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7771 invoked by alias); 3 Nov 2005 07:42:55 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 7755 invoked by uid 22791); 3 Nov 2005 07:42:52 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 03 Nov 2005 07:42:52 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jA37goru023272 for ; Thu, 3 Nov 2005 02:42:50 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jA37gjV29549; Thu, 3 Nov 2005 02:42:45 -0500 Received: from theseus.home..redhat.com (vpn26-8.sfbay.redhat.com [172.16.26.8]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id jA37gc5E025761; Thu, 3 Nov 2005 02:42:41 -0500 To: Mark Kettenis Cc: woodzltc@cn.ibm.com, gdb@sources.redhat.com Subject: Re: The root cause for SEGV in evaluating fortran function call, any solution or suggestion? References: <200511021551.jA2FpO7D009728@elgar.sibelius.xs4all.nl> From: Jim Blandy Date: Thu, 03 Nov 2005 07:42:00 -0000 In-Reply-To: <200511021551.jA2FpO7D009728@elgar.sibelius.xs4all.nl> (Mark Kettenis's message of "Wed, 2 Nov 2005 16:51:24 +0100 (CET)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-11/txt/msg00054.txt.bz2 Mark Kettenis writes: > One could argue that the debug information generated by g77 is wrong, > because it doesn't reflect the actual implementation of FUNC_NAME. Or > perhaps GDB symbol reading code causes problems. Can you post a > concrete example of a function call that goes wrong, and add a bit of > explanation about the types involved for those of us who are not very > familiar with Fortran? The types in the debug information should not reflect the extra level of indirection; the fact that they're passed by reference is just part of the meaning of a Fortran function call. But the location expression should encode the extra level of indirection. Probably value_arg_coerce should be a language method. The C promotion rules aren't appropriate for Fortran anyway, and the Fortran version could take care of applying value_addr (or something like that), and turning the array of actuals into an array of pointers to the actuals.